示例#1
0
 private void FixedUpdate()
 {
     if (OwnerHealth.IsLiving())
     {
         Move();
         ResetY();
     }
 }
示例#2
0
    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;
            }
        }
    }
示例#3
0
 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;
     }
 }
示例#4
0
 public void Respawn()
 {
     OwnerHealth.Respawn();
     DontShootTimer.Restart();
 }