Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 public void DisablePlayerControl()
 {
     if (_player)
     {
         //_respawns.SetActive(false);
         //AbilityManager.Instance.enabled = false;
         AbilityManager.Instance.BeginCutscene();
         _player.CannotControl();
     }
 }
Exemplo n.º 3
0
    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();
    }