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.

49 lines
1.1 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 Weapon : MonoBehaviour
{
public EquipmentManager EquipmentManager;
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);
}
}
}