private void FixedUpdate() { if (OwnerHealth.IsLiving()) { Move(); ResetY(); } }
public override void Fire() { if (OwnerHealth.IsLiving()) { switch (PlayerLevel) { case 0: MuzzleFire(ListOfMuzzles[0]); break; case 1: MuzzleFire(ListOfMuzzles[1]); break; case 2: MuzzleFire(ListOfMuzzles[2]); break; } } }
void Update() { if (Input.GetButton("Fire1") && OwnerHealth.IsLiving()) { Vector3 Pos = Input.mousePosition; //Left if (Pos.x < CenterScreen.x) { Movement = -Vector3.right * Speed * Time.deltaTime; } //right else if (Pos.x > CenterScreen.x) { Movement = Vector3.right * Speed * Time.deltaTime; } } else { Movement = Vector3.zero; } }
public void Respawn() { OwnerHealth.Respawn(); DontShootTimer.Restart(); }