Example #1
0
 public void SpawnPlayer()
 {
     setPlayerVisible(true);
     inputManager.enabled = true;
     gameObject.layer     = 8;
     transform.position   = new Vector3(transform.position.x, transform.position.y, 0);
     animManager.ResetAnimators();
     attackManager.SetDefaultAttack();
     attackManager.RestoreGrenade();
     animManager.PlaySpawnAnim();
     health.IgnoreDamages = true;
     health.currentHP     = health.maxHP;
     playerIndicator.SetVisible(true);
     flashBright.FlashForXSecs(ignoreDamagesDuration);
     timeUtils.TimeDelay(ignoreDamagesDuration, () =>
                         { health.IgnoreDamages = false;
                           playerIndicator.SetVisible(false); });
 }