private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mDoWaveEffectKey)) { DoWaveEffect(1, mFrequency); } }
private void Update() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mUpdateDropdown)) { UpdateDropdownData(); } }
/* Setter & Getter */ /* Functions */ private void Start() { this.spriteSets = JCS_Util.RemoveEmptySlot(this.spriteSets); /* Register callback */ { JCS_Input.joystickPluggedCallback += JoystickPluggedCallback; JCS_Input.joystickUnPluggedCallback += JoystickUnPluggedCallback; } JCS_Input.InputCallbackOnce(); }
private void TestInput() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mHopKey)) { StartHop(false); } }
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(mTestKey)) { FadeOut(); } }
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(mDropItemKey)) { DropItems(); } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKey(mDoShakeEffectKey)) { DoShake(); } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(KeyCode.N)) { SmoothTrack = !SmoothTrack; } }
private void LateUpdate() { #if (UNITY_EDITOR) // Just assign to it, in order to update the joystick // names array. this.joystickNames = Input.GetJoystickNames(); #endif GetJoystickInfo(); JCS_Input.LateUpdate(); }
/* Setter & Getter */ /* Functions */ private void OnMouseOver() { if (JCS_Input.OnMouseDoubleClick(JCS_MouseButton.LEFT)) { JCS_DialogueSystem jcsDs = JCS_UtilitiesManager.instance.GetDialogueSystem(); if (jcsDs != null) { // active dialogue system. jcsDs.ActiveDialogue(mDialogueScript); } } }
/// <summary> /// Check if the player down jumping. /// </summary> /// <returns></returns> public bool IsDownJump() { if (!mCanDownJump) { return(false); } if (JCS_Input.GetKey(JumpKey) && JCS_Input.GetKey(DownKey)) { return(true); } return(false); }
protected virtual void OnTriggerStay(Collider other) { if (mAutoPickColliderTouched) { // picked Pick(other); return; } if (JCS_Input.GetKey(mPickKey)) { Pick(other); } }
//======================================== // 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 OnMouseOver() { //Check event if (mEventType == EventType.ON_MOUSE_OVER) { JCS_ShowDescDialogue(); } //Check event else if (mEventType == EventType.ON_MOUSE_DOUBLE_CLICK && // Check if double click JCS_Input.OnMouseDoubleClick(0)) { JCS_ShowDescDialogue(); } }
/// <summary> /// Process drag drop event. /// </summary> /// <param name="type"></param> private void ProcessGUI(DragDrop type) { switch (type) { // Process Drag case DragDrop.Drag: Vector3 delta = JCS_Input.MouseDeltaPosition(); this.transform.localPosition += delta; break; // Process Drop case DragDrop.Drop: break; } }
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); } } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKey(mDeltaToA)) { UpdateScore(mDeltaValueA); } if (JCS_Input.GetKey(mDeltaToB)) { UpdateScore(mDeltaValueB); } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mKeyAdd)) { NewLinked(mCreateCount, mCreateStartIndex); } if (JCS_Input.GetKeyDown(mKeyRemove)) { RemoveLinked(mRemoveCount, mRemoveStartIndex); } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mActiveKey)) { Active(); } else if (JCS_Input.GetKeyDown(mDeactiveKey)) { Deactive(); } }
private void Update() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDown(mCastToScreenKey)) { CastToScreen(mCastToScreenPosition); } if (JCS_Input.GetKeyDown(mCastToWorldKey)) { CastToWorld(mCastToWorldPosition); } }
private void Update() { if (!mTestKey) { return; } if (JCS_Input.GetKeyDown(mActiveKey)) { Active(); } if (JCS_Input.GetKeyDown(mDeactiveKey)) { Deactive(); } }
private void Update() { if (mTestDialogueScript == null) { return; } if (JCS_Input.GetKeyDown(DisposeKey)) { mDialogueSystem.Dispose(); } if (JCS_Input.GetKeyDown(RunScriptKey)) { mDialogueSystem.ActiveDialogue(mTestDialogueScript); } }
//---------------------- // Protected Functions //---------------------- // Private Functions /// <summary> /// Process/Handle the inputs from the user. /// </summary> private void ProcessInput() { if (JCS_Input.GetMouseByAction(mShootAction.KeyAct, mShootAction.MouseButton) || JCS_Input.GetKeyByAction(mShootAction.KeyAct, mShootAction.ShootKeyCode)) { // check we are able to shoot. // like enough mana to cast? or something like this. if (mShootAction.GetCheckAbleToShootFunction().Invoke()) { // do callback mShootAction.GetShootCallback().Invoke(); ShootsInSequence(); } } }
private void Test() { if (!mTestWithKey) { return; } if (JCS_Input.GetKeyDownWith(mUndoKey)) { Undo(); } if (JCS_Input.GetKeyDownWith(mRedoKey)) { Redo(); } }
protected override void PlayerInput() { if (JCS_Input.GetKey(mUpKey) || JCS_Input.GetKey(mDownKey) || JCS_Input.GetKey(mLeftKey) || JCS_Input.GetKey(mRightKey)) { mVelocity.z = mMoveSpeed; } else { mVelocity.z = 0; } if (JCS_Input.GetKeyDown(KeyCode.Space)) { mVelocity.y = mJumpForce; } }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.C)) { StartActive(); } if (JCS_Input.GetKeyDown(KeyCode.V)) { StopActive(); } if (JCS_Input.GetKeyDown(KeyCode.X)) { PlayOneShot(10); } }
private void Test() { if (JCS_Input.GetKeyDown(KeyCode.Q)) { SendLogMessage("Hello World!"); } if (JCS_Input.GetKeyDown(KeyCode.W)) { SendLogMessage("EXP: 10"); } if (JCS_Input.GetKeyDown(KeyCode.E)) { string[] msgs = { "Ok", "Cool?", "Awesome!" }; SendLogMessages(msgs); } }
private void Test() { if (!testWithKey) { return; } if (JCS_Input.GetKeyDown(playKey)) { Play(); } if (JCS_Input.GetKeyDown(stopKey)) { Stop(); } }