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();
            }
        }
예제 #3
0
        /* 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();
        }
예제 #4
0
        private void TestInput()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mHopKey))
            {
                StartHop(false);
            }
        }
예제 #5
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mTestKey))
            {
                SetCurrentTime(59, 59, 59);
            }
        }
예제 #6
0
        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();
            }
        }
예제 #9
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKey(mDoShakeEffectKey))
            {
                DoShake();
            }
        }
예제 #10
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(KeyCode.N))
            {
                SmoothTrack = !SmoothTrack;
            }
        }
예제 #11
0
        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();
        }
예제 #12
0
        /* 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);
                }
            }
        }
예제 #13
0
        /// <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);
        }
예제 #14
0
        protected virtual void OnTriggerStay(Collider other)
        {
            if (mAutoPickColliderTouched)
            {
                // picked
                Pick(other);
                return;
            }

            if (JCS_Input.GetKey(mPickKey))
            {
                Pick(other);
            }
        }
예제 #15
0
        //========================================
        //      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));
            }
        }
예제 #16
0
 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);
                }
            }
        }
예제 #19
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKey(mDeltaToA))
            {
                UpdateScore(mDeltaValueA);
            }
            if (JCS_Input.GetKey(mDeltaToB))
            {
                UpdateScore(mDeltaValueB);
            }
        }
예제 #20
0
        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();
            }
        }
예제 #22
0
        private void Update()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mCastToScreenKey))
            {
                CastToScreen(mCastToScreenPosition);
            }
            if (JCS_Input.GetKeyDown(mCastToWorldKey))
            {
                CastToWorld(mCastToWorldPosition);
            }
        }
예제 #23
0
        private void Update()
        {
            if (!mTestKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mActiveKey))
            {
                Active();
            }
            if (JCS_Input.GetKeyDown(mDeactiveKey))
            {
                Deactive();
            }
        }
예제 #24
0
        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();
            }
        }
예제 #27
0
        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;
            }
        }
예제 #28
0
        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);
            }
        }
예제 #29
0
        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);
            }
        }
예제 #30
0
        private void Test()
        {
            if (!testWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(playKey))
            {
                Play();
            }

            if (JCS_Input.GetKeyDown(stopKey))
            {
                Stop();
            }
        }