You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.4 KiB
C#
59 lines
1.4 KiB
C#
|
4 years ago
|
|
||
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
using UnityEngine.EventSystems;
|
||
|
|
using UnityEngine.Events;
|
||
|
|
using SiegeSong;
|
||
|
|
|
||
|
|
namespace SiegeSong
|
||
|
|
{
|
||
|
|
public class Equipable : MonoBehaviour
|
||
|
|
{
|
||
|
|
public int ID;
|
||
|
|
public string FriendlyName;
|
||
|
|
|
||
|
|
public EquipableArea EquipableArea;
|
||
|
|
|
||
|
|
public GameObject[] Techniques;
|
||
|
|
public GameObject PutAwayTechnique;
|
||
|
|
public GameObject DefaultTechnique { get { return Techniques.Length > 0 ? Techniques[0] : null; } }
|
||
|
|
|
||
|
|
public EquipmentManager EquipmentManager;
|
||
|
4 years ago
|
public StatisticsManager Actor;
|
||
|
4 years ago
|
public PhysicalMaterial PhysicalMaterial;
|
||
|
|
public UnityEvent OnHit;
|
||
|
|
public UnityEvent OnEnable;
|
||
|
|
public UnityEvent OnDisable;
|
||
|
|
|
||
|
|
public int StanceID;
|
||
|
|
|
||
|
|
void Start()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
void Update()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
public void ToggleEnabled(bool enabled)
|
||
|
|
{
|
||
|
|
gameObject.active = enabled;
|
||
|
|
if (gameObject.active == false)
|
||
|
|
{
|
||
|
|
OnDisable.Invoke();
|
||
|
|
EquipmentManager.UpdateStance(EquipableArea.Right);
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
OnEnable.Invoke();
|
||
|
|
EquipmentManager.UpdateStance(EquipableArea.Right, StanceID);
|
||
|
|
}
|
||
|
|
|
||
|
|
EquipmentManager.ResetTechnique(EquipableArea.Right);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|