public void UpdateWithIOEvent(IOEvent ioEvent)
 {
     if (pointedAtTarget && ioEvent.Equals(space))
     {
         Fire();
     }
 }
Example #2
0
 public void UpdateWithIOEvent(IOEvent ioEvent)
 {
     if (ioEvent.Equals(space))
     {
         Fire();
     }
 }
 public void UpdateWithIOEvent(IOEvent ioEvent)
 {
     if (ioEvent.Equals(forward))
     {
         Acceleration = MaxAcceleration;
     }
     else if (ioEvent.Equals(back))
     {
         Acceleration = -MaxAcceleration;
     }
     else if (ioEvent.Equals(left))
     {
         turnRight = false;
         turnLeft = true;
     }
     else if (ioEvent.Equals(right))
     {
         turnRight = true;
         turnLeft = false;
     }
 }
Example #4
0
        public void UpdateWithIOEvent(IOEvent ioEvent)
        {
            if (ioEvent.Equals(forward))
            {
                this.SpeedUp = true;
            }
            else if (ioEvent.Equals(back))
            {

                this.SlowDown = true;
            }
            else if (ioEvent.Equals(left))
            {
                turnRight = false;
                turnLeft = true;
            }
            else if (ioEvent.Equals(right))
            {
                turnRight = true;
                turnLeft = false;
            }
        }
 public override void UpdateWithIOEvent(IOEvent ioEvent)
 {
     if(ioEvent.Equals(rightMousePress))
     {
         Vector2 sceenPosition = IOState.MouseScreenPosition();
         Vector2 worldPosition = this.Game.Camera.ScreenToWorldPosition(sceenPosition);
         positions.Add(worldPosition);
     }
     else if (ioEvent.Equals(ctrRelease))
     {
         if (positions.Count != 0)
         {
             new SetCompanyPositions(this.LocalPlayer, coSelected.SelectedCompany, positions);
         }
         this.LocalPlayer.PopUIContext();
         this.UpdateNextInStackIO(ioEvent);
     }
     else
     {
         this.UpdateNextInStackIO(ioEvent);
     }
 }
Example #6
0
 public void UpdateWithIOEvent(IOEvent ioEvent)
 {
     if (ioEvent.Equals(up))
     {
         this.position = this.position + new Vector2(0, -10) / zoom;
     }
     else if (ioEvent.Equals(down))
     {
         this.position = this.position + new Vector2(0, 10) / zoom;
     }
     else if (ioEvent.Equals(left))
     {
         this.position = this.position + new Vector2(-10, 0) / zoom;
     }
     else if (ioEvent.Equals(right))
     {
         this.position = this.position + new Vector2(10, 0) / zoom;
     }
 }
 public void UpdateWithIOEvent(IOEvent ioEvent)
 {
     if (ioEvent.Equals(forward))
     {
         aimPointMove = aimPointMove + new Vector2(0, -1);
     }
     else if (ioEvent.Equals(back))
     {
         aimPointMove = aimPointMove + new Vector2(0, 1);
     }
     else if (ioEvent.Equals(left))
     {
         aimPointMove = aimPointMove + new Vector2(-1, 0);
     }
     else if (ioEvent.Equals(right))
     {
         aimPointMove = aimPointMove + new Vector2(1, 0);
     }
     else if (ioEvent.Equals(fire))
     {
         NotifyObservers(new GunnerFire());
     }
 }
 public void UpdateWithIOEvent(IOEvent ioEvent)
 {
     if (ioEvent.Equals(forward))
     {
         movementControl = movementControl + 1;
     }
     else if (ioEvent.Equals(back))
     {
         movementControl = movementControl - 1;
     }
     else if (ioEvent.Equals(left))
     {
         angleControl = angleControl - 1;
     }
     else if (ioEvent.Equals(right))
     {
         angleControl = angleControl + 1;
     }
     else if (ioEvent.Equals(fire) || ioEvent.Equals(space))
     {
         isFire = true;
     }
 }