예제 #1
0
 private void Update()
 {
     if (JCS_Input.GetKeyDown(mKeyCode))
     {
         ActiveSkill();
     }
 }
예제 #2
0
 private void Test()
 {
     if (JCS_Input.GetKeyDown(KeyCode.H))
     {
         ApplyTargetForAnim(-1);
     }
 }
예제 #3
0
 /// <summary>
 /// Process the input base on platform
 /// </summary>
 private void ProcessInput()
 {
     if (JCS_Input.GetKeyDown(mOpenKey))
     {
         ToggleVisibility();
     }
 }
예제 #4
0
 private void Test()
 {
     if (JCS_Input.GetKeyDown(KeyCode.B))
     {
         DropItems();
     }
 }
예제 #5
0
        //----------------------
        // Protected Functions

        //----------------------
        // Private Functions
#if (UNITY_STANDALONE || UNITY_EDITOR)
        private void ProcessInput()
        {
            if (JCS_Input.GetKeyDown(mTakePic))
            {
                TakeSnapshotWebcam();
            }
        }
예제 #6
0
        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);
            }
        }
예제 #8
0
        /// <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
        }
예제 #9
0
 private void Test()
 {
     if (JCS_Input.GetKeyDown(KeyCode.L))
     {
         TriggerAction();
     }
 }
예제 #10
0
        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();
            }
        }
예제 #11
0
 private void Test()
 {
     if (JCS_Input.GetKeyDown(KeyCode.N))
     {
         SmoothTrack = !SmoothTrack;
     }
 }
예제 #12
0
        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);
            }
        }
예제 #13
0
        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);
                }
            }
        }
예제 #14
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();
                }
            }
        }
예제 #16
0
 private void Test()
 {
     if (JCS_Input.GetKeyDown(KeyCode.T))
     {
         DoWaveEffect(1, mFrequency);
     }
 }
예제 #17
0
        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);
                    }
                }
            }
        }
예제 #18
0
 private void Test()
 {
     if (JCS_Input.GetKeyDown(KeyCode.P))
     {
         Play();
     }
     if (JCS_Input.GetKeyDown(KeyCode.O))
     {
         Pause();
     }
 }
예제 #19
0
 private void Update()
 {
     if (JCS_Input.GetKeyDown(KeyCode.F))
     {
         SwitchAIMoveState(JCS_AIMoveActionType.FLY);
     }
     if (JCS_Input.GetKeyDown(KeyCode.W))
     {
         SwitchAIMoveState(JCS_AIMoveActionType.WALK);
     }
 }
예제 #20
0
        private void Update()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mUpdateDropdown))
            {
                UpdateDropdownData();
            }
        }
예제 #21
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(KeyCode.N))
            {
                SmoothTrack = !SmoothTrack;
            }
        }
예제 #22
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mUpdateInputField))
            {
                UpdateInputFieldData();
            }
        }
예제 #23
0
        private void Test()
        {
            if (JCS_Input.GetKeyDown(KeyCode.H))
            {
                Play();
            }

            if (JCS_Input.GetKeyDown(KeyCode.J))
            {
                Stop();
            }
        }
예제 #24
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mTestKey))
            {
                SetCurrentTime(59, 59, 59);
            }
        }
예제 #25
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mDoWaveEffectKey))
            {
                DoWaveEffect(1, mFrequency);
            }
        }
예제 #26
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mTestKey))
            {
                FadeOut();
            }
        }
예제 #27
0
        private void TestInput()
        {
            if (!mTestWithKey)
            {
                return;
            }

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

            if (JCS_Input.GetKeyDown(mDropItemKey))
            {
                DropItems();
            }
        }
예제 #29
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));
            }
        }
        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);
                }
            }
        }