Exemplo n.º 1
0
        public void ToggleAimMode()
        {
            int currentAimModeNum = this.availableAimModes.IndexOf(this.currentAimModeInt);

            currentAimModeNum      = (currentAimModeNum + 1) % this.availableAimModes.Count;
            this.currentAimModeInt = this.availableAimModes.ElementAt(currentAimModeNum);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Told to turn both body and arms towards the walk direction.
 /// </summary>
 public void ToFaceWalkDirection()
 {
     _bodyMode   = BodyMode.walk;
     _aimMode    = AimMode.walk;
     _hasBodyAim = true;
     _hasAim     = true;
 }
Exemplo n.º 3
0
        public void ToggleAimMode()
        {
            int currentAimModeNum = availableAimModes.IndexOf(currentAimModeInt);

            currentAimModeNum = (currentAimModeNum + 1) % availableAimModes.Count;
            currentAimModeInt = availableAimModes.ElementAt(currentAimModeNum);
        }
Exemplo n.º 4
0
 public void ToTarget(ActorTarget target)
 {
     _target          = target;
     _bodyMode        = BodyMode.actor;
     _aimMode         = AimMode.actor;
     _hasBodyAim      = true;
     _hasAim          = true;
     _isTurningSlowly = false;
 }
Exemplo n.º 5
0
        /// <summary>
        /// Resets the selected fire mode to the first one available (e.g. when the gun is dropped)
        /// </summary>
        public void ResetModes()
        {
            //Required since availableFireModes.Capacity is set but its contents aren't so ElementAt(0) causes errors in some instances
            if (availableFireModes.Count > 0)
            {
                currentFireModeInt = availableFireModes.ElementAt(0);
            }

            currentAimModeInt = availableAimModes.ElementAt(0);
        }
Exemplo n.º 6
0
        public void aimTo(Vector3 direction)
        {
            _aim     = direction;
            _aimMode = AimMode.direction;
            _hasAim  = true;

            if (!_hasBodyAim)
            {
                ToTurnTo(direction);
            }
        }
Exemplo n.º 7
0
        public void aimAt(Vector3 position)
        {
            _aim     = position;
            _aimMode = AimMode.position;
            _hasAim  = true;

            if (!_hasBodyAim)
            {
                ToTurnAt(position);
            }
        }
Exemplo n.º 8
0
        public void ToggleAimMode()
        {
            int currentAimModeNum = availableAimModes.IndexOf(currentAimModeInt);

            currentAimModeNum = (currentAimModeNum + 1) % availableAimModes.Count;
            currentAimModeInt = availableAimModes.ElementAt(currentAimModeNum);
            if (availableAimModes.Count > 1)
            {
                PlayerKnowledgeDatabase.KnowledgeDemonstrated(CE_ConceptDefOf.CE_AimModes, KnowledgeAmount.Total);
            }
        }
Exemplo n.º 9
0
 void Start()
 {
     if (cInput.GetText("Fire1" + main.playerNumber).Contains("Mouse"))
     {
         aimMode = AimMode.Mouse;
     }
     else
     {
         aimMode = AimMode.Joystick;
     }
 }
Exemplo n.º 10
0
    // Methods
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.U))
        {
            uiRoot.SetActive(!uiRoot.activeSelf);
        }

        if (Input.GetKeyDown(KeyCode.F))
        {
            aimMode = aimMode == AimMode.Normal ? AimMode.Lateral : AimMode.Normal;
        }
    }
Exemplo n.º 11
0
        /// <summary>
        /// Told to start scanning the surrounding area.
        /// </summary>
        public void ToScan()
        {
            if (_bodyMode != BodyMode.scan)
            {
                findNewScanDirection();
            }

            _bodyMode   = BodyMode.scan;
            _aimMode    = AimMode.scan;
            _hasBodyAim = true;
            _hasAim     = true;
        }
Exemplo n.º 12
0
	void AimShips(){
		newAim = false;
		if (Input.GetButtonDown (myShip.GetInputManager.AimShips)) {
			newAim = true;
			if (aimMode == AimMode.Straight){
				aimMode = getFocused ? AimMode.Focus : AimMode.Outward;
				getFocused = !getFocused;
			}
			else if (aimMode == AimMode.Focus || aimMode == AimMode.Outward){
				aimMode = AimMode.Straight;
			}

			PlayAimSounds();
		}
	}
Exemplo n.º 13
0
    void AimShips()
    {
        newAim = false;
        if (Input.GetButtonDown(myShip.GetInputManager.AimShips))
        {
            newAim = true;
            if (aimMode == AimMode.Straight)
            {
                aimMode    = getFocused ? AimMode.Focus : AimMode.Outward;
                getFocused = !getFocused;
            }
            else if (aimMode == AimMode.Focus || aimMode == AimMode.Outward)
            {
                aimMode = AimMode.Straight;
            }

            PlayAimSounds();
        }
    }
Exemplo n.º 14
0
 /// <summary>
 /// Resets the selected fire mode to the first one available (e.g. when the gun is dropped)
 /// </summary>
 public void ResetModes()
 {
     this.currentFireModeInt = this.availableFireModes.ElementAt(0);
     this.currentAimModeInt  = this.availableAimModes.ElementAt(0);
 }
Exemplo n.º 15
0
 /// <summary>
 /// Resets the selected fire mode to the first one available (e.g. when the gun is dropped)
 /// </summary>
 public void ResetModes()
 {
     currentFireModeInt = availableFireModes.ElementAt(0);
     currentAimModeInt  = availableAimModes.ElementAt(0);
 }
Exemplo n.º 16
0
 public void ToggleAimMode()
 {
     aimMode = aimMode == AimMode.Normal ? AimMode.Lateral : AimMode.Normal;
 }