public void ToggleAimMode() { int currentAimModeNum = this.availableAimModes.IndexOf(this.currentAimModeInt); currentAimModeNum = (currentAimModeNum + 1) % this.availableAimModes.Count; this.currentAimModeInt = this.availableAimModes.ElementAt(currentAimModeNum); }
/// <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; }
public void ToggleAimMode() { int currentAimModeNum = availableAimModes.IndexOf(currentAimModeInt); currentAimModeNum = (currentAimModeNum + 1) % availableAimModes.Count; currentAimModeInt = availableAimModes.ElementAt(currentAimModeNum); }
public void ToTarget(ActorTarget target) { _target = target; _bodyMode = BodyMode.actor; _aimMode = AimMode.actor; _hasBodyAim = true; _hasAim = true; _isTurningSlowly = false; }
/// <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); }
public void aimTo(Vector3 direction) { _aim = direction; _aimMode = AimMode.direction; _hasAim = true; if (!_hasBodyAim) { ToTurnTo(direction); } }
public void aimAt(Vector3 position) { _aim = position; _aimMode = AimMode.position; _hasAim = true; if (!_hasBodyAim) { ToTurnAt(position); } }
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); } }
void Start() { if (cInput.GetText("Fire1" + main.playerNumber).Contains("Mouse")) { aimMode = AimMode.Mouse; } else { aimMode = AimMode.Joystick; } }
// 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; } }
/// <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; }
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(); } }
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(); } }
/// <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); }
/// <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); }
public void ToggleAimMode() { aimMode = aimMode == AimMode.Normal ? AimMode.Lateral : AimMode.Normal; }