Files
test/Assets/PerfectWorld/Scripts/UI/JumpBtn.cs
T
Tungdv 97bf433381 fix: update logic move on ground.
feat: add btn jump.
2025-12-17 10:40:29 +07:00

30 lines
713 B
C#

using BrewMonster.Network;
using UnityEngine;
using UnityEngine.UI;
namespace BrewMonster.UI
{
public class JumpBtn : MonoBehaviour
{
Button jumpBtn;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
if(jumpBtn == null)
{
jumpBtn = GetComponent<Button>();
jumpBtn.onClick.AddListener(OnClickBtnJump);
}
}
private void OnClickBtnJump()
{
if(EC_Game.GetGameRun()?.GetHostPlayer() != null)
{
EC_Game.GetGameRun()?.GetHostPlayer().OnClickBtnJump();
}
}
}
}