private void Update() { if (JCS_Input.GetKeyDown(mKeyCode)) { ActiveSkill(); } }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.H)) { ApplyTargetForAnim(-1); } }
/// <summary> /// Process the input base on platform /// </summary> private void ProcessInput() { if (JCS_Input.GetKeyDown(mOpenKey)) { ToggleVisibility(); } }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.B)) { DropItems(); } }
//---------------------- // Protected Functions //---------------------- // Private Functions #if (UNITY_STANDALONE || UNITY_EDITOR) private void ProcessInput() { if (JCS_Input.GetKeyDown(mTakePic)) { TakeSnapshotWebcam(); } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mLackKey)) { Lack(); } if (JCS_Input.GetKeyDown(mFullKey)) { Full(); } // half if (JCS_Input.GetKeyDown(mHalfKey)) { SetCurrentValue(MaxValue / 2.0f); } if (JCS_Input.GetKeyDown(mFixedKey)) { FixPercentage(); } }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.P)) { byte[] bytesSend = new byte[5]; bytesSend[0] = (byte)'H'; bytesSend[1] = (byte)'E'; bytesSend[2] = (byte)'l'; bytesSend[3] = (byte)'L'; bytesSend[4] = (byte)'o'; JCS_NetworkSettings.GetGameSocket().SendPacket(bytesSend); } if (JCS_Input.GetKeyDown(KeyCode.O)) { byte[] bytesSend = new byte[10]; bytesSend[0] = (byte)'Z'; bytesSend[1] = (byte)'X'; bytesSend[2] = (byte)'C'; bytesSend[3] = (byte)'V'; bytesSend[4] = (byte)'B'; bytesSend[5] = (byte)'N'; bytesSend[6] = (byte)'M'; bytesSend[7] = (byte)','; bytesSend[8] = (byte)'.'; bytesSend[9] = (byte)'/'; JCS_NetworkSettings.GetGameSocket().SendPacket(bytesSend); } }
/// <summary> /// Process the input of this camera. /// </summary> private void InputCamera() { #if (UNITY_EDITOR || UNITY_STANDALONE) if (JCS_Input.GetKeyDown(mResetKeyCode)) { ResetCamera(); } if (JCS_Input.GetKeyDown(mUpKey)) { UpCamera(); } else if (JCS_Input.GetKeyDown(mDownKey)) { DownCamera(); } if (JCS_Input.GetKey(mRotateAroundLeft)) { RotateAroundLeft(); } else if (JCS_Input.GetKey(mRotateAroundRight)) { RotateAroundRight(); } #endif }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.L)) { TriggerAction(); } }
private void Test() { if (!mTestWithKey) { return; } //if (JCS_Input.GetKeyDown(KeyCode.A)) // JCS_UtilityFunctions.PopIsConnectDialogue(); //if (JCS_Input.GetKeyDown(KeyCode.S)) // JCS_UtilityFunctions.PopSettingDialogue(); //if (JCS_Input.GetKeyDown(KeyCode.D)) // JCS_UtilityFunctions.PopInGameUI(); //if (JCS_Input.GetKeyDown(KeyCode.F)) // JCS_UtilityFunctions.PopTalkDialogue(); if (JCS_Input.GetKeyDown(KeyCode.A)) { Color col = Color.red; col.a = 0.6f; Focus(col); } if (JCS_Input.GetKeyDown(KeyCode.S)) { UnFocus(); } }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.N)) { SmoothTrack = !SmoothTrack; } }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.Alpha1)) { SetSpeedLayer(JCS_SpeedLayer.VERY_FAST); } if (JCS_Input.GetKeyDown(KeyCode.Alpha2)) { SetSpeedLayer(JCS_SpeedLayer.FAST); } if (JCS_Input.GetKeyDown(KeyCode.Alpha3)) { SetSpeedLayer(JCS_SpeedLayer.NORMAL); } if (JCS_Input.GetKeyDown(KeyCode.Alpha4)) { SetSpeedLayer(JCS_SpeedLayer.SLOW); } if (JCS_Input.GetKeyDown(KeyCode.Alpha5)) { SetSpeedLayer(JCS_SpeedLayer.VERY_SLOW); } }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.N)) { // Testing helper function so spawn sequence of damage // Showing u can get the damage from ite const int x_count = 10; const float x_distance = 3f; const float y_randDistance = 0.8f; for (int count = 0; count < x_count; ++count) { DamageTextSpawnerSimple( 0, 9999, new Vector2( x_distance * count, JCS_Random.Range(-y_randDistance, y_randDistance)), 6, 30, 0); } } }
/// <summary> /// Process the input base on platform /// </summary> private void ProcessInput() { if (JCS_Input.GetKeyDown(GetKeyCode())) { ToggleVisibility(); } }
protected override void FixedUpdate() { base.FixedUpdate(); if (JCS_Input.GetKeyDown(KeyCode.H)) { JCS_SceneManager.instance.LoadScene("JCS_SideScrollerDemo"); } if (mIndex == 0) { if (JCS_Input.GetKey(KeyCode.UpArrow)) { GoUp(); } else if (JCS_Input.GetKey(KeyCode.DownArrow)) { GoDown(); } else if (JCS_Input.GetKey(KeyCode.RightArrow)) { GoRight(); } else if (JCS_Input.GetKey(KeyCode.LeftArrow)) { GoLeft(); } else { Idle(); } } if (mIndex == 1) { if (JCS_Input.GetKey(KeyCode.W)) { GoUp(); } else if (JCS_Input.GetKey(KeyCode.S)) { GoDown(); } else if (JCS_Input.GetKey(KeyCode.D)) { GoRight(); } else if (JCS_Input.GetKey(KeyCode.A)) { GoLeft(); } else { Idle(); } } }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.T)) { DoWaveEffect(1, mFrequency); } }
private void Update() { #if (UNITY_EDITOR) if (mTestWithKey) { if (JCS_Input.GetKeyDown(mPlayForthKey)) { PlayForth(); } if (JCS_Input.GetKeyDown(mPlayBackKey)) { PlayBack(); } } #endif // play forth first if (mPlayForth) { mAnimationTimer += Time.deltaTime; if (mAnimationTimer > mAnimtorStateInfo.length) { mPlayForth = false; // since we are using the same timer, // we simply set the timer to zero in order to // calculate the back animation time. mAnimationTimer = 0; // disable the animator mAnimator.enabled = false; } } // play back second if (mPlayBack) { mAnimationTimer += Time.deltaTime; if (mAnimationTimer > mAnimtorStateInfo.length) { mPlayBack = false; mAnimationTimer = 0; // Add up the play count. ++mPlayCount; // If reach the play times, destroy it. if (mPlayTimes <= mPlayCount) { Destroy(this.gameObject); } } } }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.P)) { Play(); } if (JCS_Input.GetKeyDown(KeyCode.O)) { Pause(); } }
private void Update() { if (JCS_Input.GetKeyDown(KeyCode.F)) { SwitchAIMoveState(JCS_AIMoveActionType.FLY); } if (JCS_Input.GetKeyDown(KeyCode.W)) { SwitchAIMoveState(JCS_AIMoveActionType.WALK); } }
private void Update() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mUpdateDropdown)) { UpdateDropdownData(); } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(KeyCode.N)) { SmoothTrack = !SmoothTrack; } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mUpdateInputField)) { UpdateInputFieldData(); } }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.H)) { Play(); } if (JCS_Input.GetKeyDown(KeyCode.J)) { Stop(); } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mTestKey)) { SetCurrentTime(59, 59, 59); } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mDoWaveEffectKey)) { DoWaveEffect(1, mFrequency); } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mTestKey)) { FadeOut(); } }
private void TestInput() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mHopKey)) { StartHop(false); } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mDropItemKey)) { DropItems(); } }
//======================================== // Unity's function //------------------------------ #if (UNITY_EDITOR) private void Update() { if (JCS_Input.GetKeyDown(KeyCode.A)) { ActivePathfinding(); } if (JCS_Input.GetKeyDown(KeyCode.S)) { ActivePathfinding(new Vector3(0, 0, 32)); } if (JCS_Input.GetKeyDown(KeyCode.D)) { ActivePathfinding(new Vector3(0, 0, 32.2f)); } }
private void Update() { #if (UNITY_EDITOR) if (JCS_Input.GetKeyDown(KeyCode.I)) { PlayForth(); } if (JCS_Input.GetKeyDown(KeyCode.O)) { PlayBack(); } #endif // play forth first if (mPlayForth) { mAnimationTimer += Time.deltaTime; if (mAnimationTimer > mAnimtorStateInfo.length) { mPlayForth = false; // since we are using the same timer, // we simply set the timer to zero in order to // calculate the back animation time. mAnimationTimer = 0; // disable the animator mAnimator.enabled = false; } } // play back second if (mPlayBack) { mAnimationTimer += Time.deltaTime; if (mAnimationTimer > mAnimtorStateInfo.length) { mPlayBack = false; mAnimationTimer = 0; Destroy(this.gameObject); } } }