// Update is called once per frame void Update() { if (IsPressed() && player.activeSelf) //Player active해제 시 안먹힘 { aa.Jumping(); } }
public virtual void OnPointerDown(PointerEventData ped) { // OnDrag (ped); // onoffList.OnTime = Time.realtimeSinceStartup; Moving_by_RLbuttons aa = GameObject.FindWithTag("Player").GetComponent <Moving_by_RLbuttons>(); aa.Jumping(); }
public virtual void OnPointerDown(PointerEventData ped) { // OnDrag (ped); // onoffList.OnTime = Time.realtimeSinceStartup; GameObject pl = GameObject.FindWithTag("Player"); Moving_by_RLbuttons aa = pl.GetComponent <Moving_by_RLbuttons>(); if (aa.enabled && pl.GetComponent <Rigidbody2D>().velocity == Vector2.zero) { aa.Jumping(); } }