private void Test() { if (JCS_Input.GetKeyDown(KeyCode.H)) { LockShoot(); } }
private void Update() { if (JCS_Input.GetKeyDown(KeyCode.R)) { JCS_UtilityFunctions.QuitApplicationWithSwithScene(); } }
protected override void Update() { base.Update(); Stand(); if (JCS_Input.GetKeyDown(KeyCode.LeftAlt) || JCS_Input.GetKeyDown(KeyCode.RightAlt)) { Jump(); } if (JCS_Input.GetKey(KeyCode.Space)) { Attack(); } else if (JCS_Input.GetKey(KeyCode.UpArrow)) { ClimbOrTeleport(); } else if (JCS_Input.GetKey(KeyCode.RightArrow)) { MoveRight(); } else if (JCS_Input.GetKey(KeyCode.LeftArrow)) { MoveLeft(); } else if (JCS_Input.GetKey(KeyCode.DownArrow)) { Prone(); } }
private void Update() { if (JCS_Input.GetKeyDown(KeyCode.G)) { JCS_TransformTweener masterTweener = mParticle.GetComponent <JCS_TransformTweener>(); JCS_TowardTarget masterTt = mParticle.GetComponent <JCS_TowardTarget>(); for (int index = 0; index < mParticles.length; ++index) { JCS_TransformTweener tweener = mParticles.at(index).GetComponent <JCS_TransformTweener>(); tweener.EasingX = masterTweener.EasingX; tweener.EasingY = masterTweener.EasingY; tweener.EasingZ = masterTweener.EasingZ; tweener.DurationX = masterTweener.DurationX; tweener.DurationY = masterTweener.DurationY; tweener.DurationZ = masterTweener.DurationZ; JCS_TowardTarget tt = mParticles.at(index).GetComponent <JCS_TowardTarget>(); tt.Range = masterTt.Range; tt.AdjustRange = masterTt.AdjustRange; tt.IncludeDepth = masterTt.IncludeDepth; } print("Particles updated."); } }
private void Update() { if (JCS_Input.GetKeyDown(KeyCode.C)) { //this.transform.position = JCS_Mathf.RotatePointY(this.transform.position, mOrigin.transform.position, mAngle); } if (JCS_Input.GetKey(KeyCode.C)) { --angleY; this.transform.position = JCS_Mathf.CirclePositionY( origin.transform.position, angleY, radius, this.transform.position); } if (JCS_Input.GetKey(KeyCode.V)) { ++angleZ; this.transform.position = JCS_Mathf.CirclePositionZ( origin.transform.position, angleZ, radius, this.transform.position); } }
private void Update() { if (JCS_Input.GetKeyDown(KeyCode.T)) { print(JCS_TimeManager.GetCurrentTime()); print(JCS_TimeManager.isAfternoon()); } }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.V)) { Freeze(2); } if (JCS_Input.GetKeyDown(KeyCode.C)) { Burn(2); } }
private void Update() { if (JCS_Input.GetKeyDown(KeyCode.G)) { castAction.CastToScreen(this.transform.position); } if (JCS_Input.GetKeyDown(KeyCode.T)) { castAction.CastToScreen(this.transform.localPosition); } }
/* Setter/Getter */ /* Functions */ private void Update() { if (JCS_Input.GetKeyDown(KeyCode.A)) { JCS_SoundManager.instance.SwitchBackgroundMusic(mBGM_01, 0.5f, 0.5f); } if (JCS_Input.GetKeyDown(KeyCode.S)) { JCS_SoundManager.instance.SwitchBackgroundMusic(mBGM_02, 0.5f, 0.5f); } if (JCS_Input.GetKeyDown(KeyCode.D)) { JCS_SoundManager.instance.PlayOneShotBackgroundMusic(mOneShotBGM, mOnStackBGM); } }
private void PCInput() { switch (mControlIndex) { // player 1 case 0: { if (JCS_Input.GetKey(KeyCode.W)) { Jump(); } if (JCS_Input.GetKeyDown(KeyCode.E)) { ToggleWait(); } } break; // player 2 case 1: { if (JCS_Input.GetKey(KeyCode.UpArrow)) { Jump(); } if (JCS_Input.GetKeyDown(KeyCode.RightControl)) { ToggleWait(); } } break; // player 3 case 2: { if (JCS_Input.GetKey(KeyCode.I)) { Jump(); } if (JCS_Input.GetKeyDown(KeyCode.O)) { ToggleWait(); } } break; // player 4 case 3: { if (JCS_Input.GetKey(KeyCode.Keypad8)) { Jump(); } if (JCS_Input.GetKeyDown(KeyCode.Keypad9)) { ToggleWait(); } } break; } MoveRight(); if (JCS_Input.GetKeyDown(KeyCode.P)) { JCS_SceneManager.instance.LoadScene("RC_LogoScene"); } }
/* Setter & Getter */ /* Functions */ private void Update() { PrintGamepadInfo(false); switch (JCS_InputSettings.instance.TargetGamePad) { case JCS_GamePadType.PS4: { /* Stick test. */ if (valueKeyTest) { float val = JCS_Input.GetAxis(0, JCS_JoystickButton.STICK_RIGHT_X); print("Stick right X: " + val); val = JCS_Input.GetAxis(0, JCS_JoystickButton.STICK_RIGHT_Y); print("Stick right Y: " + val); val = JCS_Input.GetAxis(0, JCS_JoystickButton.STICK_LEFT_X); print("Stick left X: " + val); val = JCS_Input.GetAxis(0, JCS_JoystickButton.STICK_LEFT_Y); print("Stick left Y: " + val); } if (JCS_Input.GetJoystickKeyDown(0, JCS_JoystickButton.BUTTON_A)) { print("Joystick button Cir"); } if (JCS_Input.GetJoystickKeyDown(0, JCS_JoystickButton.BUTTON_B)) { print("Joystick button Sqr"); } if (JCS_Input.GetJoystickKeyUp(0, JCS_JoystickButton.BUTTON_X)) { print("Joystick button X"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.BUTTON_Y)) { print("Joystick button Tri"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.LEFT_TRIGGER)) { print("Left Trigger down"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.RIGHT_TRIGGER)) { print("Right Trigger down"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.LEFT_BUMPER)) { print("Left BUMPER down"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.RIGHT_BUMPER)) { print("Right BUMPER down"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.START_BUTTON)) { print("Options down"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.BACK_BUTTON)) { print("Share down"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.BUTTON_RIGHT)) { print("Joystick button RIGHT"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.BUTTON_LEFT)) { print("Joystick button LEFT"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.BUTTON_UP)) { print("Joystick button UP"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.BUTTON_DOWN)) { print("Joystick button DOWN"); } } break; case JCS_GamePadType.XBOX_360: { /* Stick test. */ if (valueKeyTest) { float val = JCS_Input.GetAxis(0, JCS_JoystickButton.STICK_RIGHT_X); print("Stick right X: " + val); val = JCS_Input.GetAxis(0, JCS_JoystickButton.STICK_RIGHT_Y); print("Stick right Y: " + val); val = JCS_Input.GetAxis(0, JCS_JoystickButton.STICK_LEFT_X); print("Stick left X: " + val); val = JCS_Input.GetAxis(0, JCS_JoystickButton.STICK_LEFT_Y); print("Stick left Y: " + val); } if (JCS_Input.GetJoystickKeyDown(0, JCS_JoystickButton.BUTTON_A)) { print("Joystick button A"); } if (JCS_Input.GetJoystickKeyDown(0, JCS_JoystickButton.BUTTON_B)) { print("Joystick button B"); } if (JCS_Input.GetJoystickKeyUp(0, JCS_JoystickButton.BUTTON_X)) { print("Joystick button X"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.BUTTON_Y)) { print("Joystick button Y"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.BUTTON_RIGHT)) { print("Joystick button RIGHT"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.BUTTON_LEFT)) { print("Joystick button LEFT"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.BUTTON_UP)) { print("Joystick button UP"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.BUTTON_DOWN)) { print("Joystick button DOWN"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.HOME_BUTTON)) { print("Joystick button HOME"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.START_BUTTON)) { print("Joystick button START"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.BACK_BUTTON)) { print("Joystick button BACK"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.LEFT_BUMPER)) { print("Left BUMPER down"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.RIGHT_BUMPER)) { print("Right BUMPER down"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.LEFT_TRIGGER)) { print("Right trigger down"); } if (JCS_Input.GetJoystickButton(0, JCS_JoystickButton.RIGHT_TRIGGER)) { print("Left trigger down"); } if (JCS_Input.GetKeyDown(KeyCode.Joystick1Button0)) { print(KeyCode.Joystick1Button0); } } break; } }