/// <summary> /// Event received from network, tells the player to respawn. /// </summary> public void OnNetworkRespawn(Vector3 spawnPosition) { myProperties.ResetHP(); myLifebar.UpdateLifebarFill(myProperties.actualHP, myProperties.baseHP); this.transform.position = spawnPosition; this.ChangeState(PlayerStates.Idle); if (aiManager != null) { aiManager.ChangeState(PlayerAIStates.Moving); } }