You've already forked Darklings-FightingGame
mirror of
https://github.com/izzy2lost/Darklings-FightingGame.git
synced 2026-03-10 11:35:19 -07:00
39 lines
909 B
C#
39 lines
909 B
C#
using UnityEngine;
|
|
|
|
public class RightClickEditor : MonoBehaviour
|
|
{
|
|
[SerializeField] private CharacterEditor _characterEditor = default;
|
|
[SerializeField] private GameObject _rightClickWindow = default;
|
|
[SerializeField] private GameObject _canvas = default;
|
|
private AnimationSO[] _animations;
|
|
|
|
|
|
void Update()
|
|
{
|
|
if (Input.GetMouseButtonUp(1))
|
|
{
|
|
if (_canvas.activeSelf)
|
|
{
|
|
_canvas.SetActive(false);
|
|
}
|
|
else
|
|
{
|
|
_canvas.SetActive(true);
|
|
_rightClickWindow.transform.position = Input.mousePosition;
|
|
}
|
|
}
|
|
}
|
|
|
|
public void CreateHurtbox()
|
|
{
|
|
_characterEditor.CreateHurtbox();
|
|
_canvas.SetActive(false);
|
|
}
|
|
|
|
public void CreateHitbox()
|
|
{
|
|
_characterEditor.CreateHitbox();
|
|
_canvas.SetActive(false);
|
|
}
|
|
}
|