public void UseAbility() { if (_tutorial != null) { Destroy(_tutorial.gameObject); } Physics2D.gravity = new Vector2(0, 9.81f); _player.CannotControl(); _player.Rotate(); _inUse = true; GameEvents.Instance.GravitySwitchOn(); StartCoroutine(CoolDown()); //_ppc.ColdTemperature(); }
public void DisablePlayerControl() { if (_player) { //_respawns.SetActive(false); //AbilityManager.Instance.enabled = false; AbilityManager.Instance.BeginCutscene(); _player.CannotControl(); } }
IEnumerator InvokeAbility() { _player.CannotControl(); Debug.Log(Time.time); Debug.Log(_player.HaveControl()); yield return(new WaitForSecondsRealtime(_waitTime)); Debug.Log(Time.time); Debug.Log(_player.HaveControl()); UseAbility(); }