Esempio 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);
        }
Esempio 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;
 }
Esempio n. 3
0
        public void ToggleAimMode()
        {
            int currentAimModeNum = availableAimModes.IndexOf(currentAimModeInt);

            currentAimModeNum = (currentAimModeNum + 1) % availableAimModes.Count;
            currentAimModeInt = availableAimModes.ElementAt(currentAimModeNum);
        }
Esempio n. 4
0
 public void ToTarget(ActorTarget target)
 {
     _target          = target;
     _bodyMode        = BodyMode.actor;
     _aimMode         = AimMode.actor;
     _hasBodyAim      = true;
     _hasAim          = true;
     _isTurningSlowly = false;
 }
Esempio 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);
        }
Esempio n. 6
0
        public void aimTo(Vector3 direction)
        {
            _aim     = direction;
            _aimMode = AimMode.direction;
            _hasAim  = true;

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

            if (!_hasBodyAim)
            {
                ToTurnAt(position);
            }
        }
Esempio 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);
            }
        }
Esempio n. 9
0
 void Start()
 {
     if (cInput.GetText("Fire1" + main.playerNumber).Contains("Mouse"))
     {
         aimMode = AimMode.Mouse;
     }
     else
     {
         aimMode = AimMode.Joystick;
     }
 }
Esempio 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;
        }
    }
Esempio 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;
        }
Esempio 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();
		}
	}
Esempio 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();
        }
    }
Esempio 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);
 }
Esempio 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);
 }
Esempio n. 16
0
 public void ToggleAimMode()
 {
     aimMode = aimMode == AimMode.Normal ? AimMode.Lateral : AimMode.Normal;
 }