public override void Update() { ThisInput.Update(ThisStamina, Mystate); TutorialScore = Timer.ElapsedTime; foreach (KeyValuePair <int, GhostObserver> entry in Observers) { entry.Value.Update(); } }
public override void Update() { ThisInput.Update(ThisStamina, Mystate, CurrentHandTarget); TutorialScore = Timer.ElapsedTime; if (GetSanity() < 100) { Sanity += SanityRegen * Time.deltaTime; if (Sanity > 100.0f) { Sanity = 100; } if (Health > 0.0f) { float Multiplier = 0; if (Sanity < 75) { Multiplier = 1; } if (Sanity < 50) { Multiplier = 2; } if (Sanity < 25) { Multiplier = 3; } Health -= Multiplier * HealthDamage * Time.deltaTime; } GetObject().GetComponent <PhotonView>().RPC("UpdatePlayer", RpcTarget.OthersBuffered, GetSanity(), GetHealth()); } foreach (KeyValuePair <int, PlayerObserver> entry in Observers) { entry.Value.Update(); } }