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

        //----------------------
        // Private Functions
#if (UNITY_STANDALONE || UNITY_EDITOR)
        private void ProcessInput()
        {
            if (JCS_Input.GetKeyDown(mTakePic))
            {
                TakeSnapshotWebcam();
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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
        }
Exemplo n.º 9
0
 private void Test()
 {
     if (JCS_Input.GetKeyDown(KeyCode.L))
     {
         TriggerAction();
     }
 }
Exemplo n.º 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();
            }
        }
Exemplo n.º 11
0
 private void Test()
 {
     if (JCS_Input.GetKeyDown(KeyCode.N))
     {
         SmoothTrack = !SmoothTrack;
     }
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
                }
            }
        }
Exemplo n.º 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();
                }
            }
        }
Exemplo n.º 16
0
 private void Test()
 {
     if (JCS_Input.GetKeyDown(KeyCode.T))
     {
         DoWaveEffect(1, mFrequency);
     }
 }
Exemplo n.º 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);
                    }
                }
            }
        }
Exemplo n.º 18
0
 private void Test()
 {
     if (JCS_Input.GetKeyDown(KeyCode.P))
     {
         Play();
     }
     if (JCS_Input.GetKeyDown(KeyCode.O))
     {
         Pause();
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 20
0
        private void Update()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mUpdateDropdown))
            {
                UpdateDropdownData();
            }
        }
Exemplo n.º 21
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(KeyCode.N))
            {
                SmoothTrack = !SmoothTrack;
            }
        }
Exemplo n.º 22
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mUpdateInputField))
            {
                UpdateInputFieldData();
            }
        }
Exemplo n.º 23
0
        private void Test()
        {
            if (JCS_Input.GetKeyDown(KeyCode.H))
            {
                Play();
            }

            if (JCS_Input.GetKeyDown(KeyCode.J))
            {
                Stop();
            }
        }
Exemplo n.º 24
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mTestKey))
            {
                SetCurrentTime(59, 59, 59);
            }
        }
Exemplo n.º 25
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mDoWaveEffectKey))
            {
                DoWaveEffect(1, mFrequency);
            }
        }
Exemplo n.º 26
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mTestKey))
            {
                FadeOut();
            }
        }
Exemplo n.º 27
0
        private void TestInput()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mHopKey))
            {
                StartHop(false);
            }
        }
Exemplo n.º 28
0
        private void Test()
        {
            if (!mTestWithKey)
            {
                return;
            }

            if (JCS_Input.GetKeyDown(mDropItemKey))
            {
                DropItems();
            }
        }
Exemplo n.º 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);
                }
            }
        }