示例#1
0
        /* Setter & Getter */

        /* Functions */

        private void Awake()
        {
            this.m2DAnimator        = this.GetComponent <JCS_2DAnimator>();
            this.mAdjustTimeTrigger = this.GetComponent <JCS_AdjustTimeTrigger>();

            this.mAdjustTimeTrigger.actions = RandomPlayAnimationInAnimator;
        }
示例#2
0
        /*******************************************/
        /*           Protected Variables           */
        /*******************************************/

        /*******************************************/
        /*             setter / getter             */
        /*******************************************/

        /*******************************************/
        /*            Unity's function             */
        /*******************************************/
        private void Start()
        {
            this.mAnimator = this.GetComponent <JCS_2DAnimator>();

            // start the animation from the first id.
            mAnimator.DoAnimation(0, true);
        }
示例#3
0
        /* Functions */

        protected override void Awake()
        {
            base.Awake();

            this.mAudioController  = this.GetComponent <JCS_2DSideScrollerPlayerAudioController>();
            this.mJCS2DAnimator    = this.GetComponent <JCS_2DAnimator>();
            this.mOrderLayerObject = this.GetComponent <JCS_OrderLayerObject>();
        }
示例#4
0
        /* Functions */

        private void Start()
        {
            this.mAnimator = this.GetComponent <JCS_2DAnimator>();

            if (mPlayOnAwake)
            {
                // start the animation from the first id.
                mAnimator.DoAnimation(0, true);

                mActive = true;
            }
        }
示例#5
0
        /* Setter & Getter */

        /* Functions */

        private void Awake()
        {
            this.m2DAnimator = this.GetComponent <JCS_2DAnimator>();

            foreach (JCS_2DAnimation anim in m2DAnimator.Animations)
            {
                if (anim == null)
                {
                    continue;
                }

                // set the call back.
                anim.donePlayingAnimCallback = RandomPlayAnimationInAnimator;
            }
        }
示例#6
0
        /* Functions */

        private void Awake()
        {
            this.m2DAnimator = this.GetComponent <JCS_2DAnimator>();

            m2DAnimator.Animations.Add(mNormalSelect);
            m2DAnimator.Animations.Add(mHelpSelect);
            m2DAnimator.Animations.Add(mWorkingInBackground);
            m2DAnimator.Animations.Add(mBusy);
            m2DAnimator.Animations.Add(mPrecisionSelect);
            m2DAnimator.Animations.Add(mTextSelect);
            m2DAnimator.Animations.Add(mHandwriting);
            m2DAnimator.Animations.Add(mUnavaliable);
            m2DAnimator.Animations.Add(mVerticalResize);
            m2DAnimator.Animations.Add(mHorizontalResize);
            m2DAnimator.Animations.Add(mDiagonalResize1);
            m2DAnimator.Animations.Add(mDiagonalResize2);
            m2DAnimator.Animations.Add(mMove);
            m2DAnimator.Animations.Add(mAlternateSelect);
            m2DAnimator.Animations.Add(mLinkSelect);
        }
示例#7
0
        /* Functions */

        protected override void Awake()
        {
            base.Awake();

            this.mSpriteRenderer = this.GetComponent <SpriteRenderer>();
            this.m2DAnimator     = this.GetComponent <JCS_2DAnimator>();

            // try to get this component in this transform.
            if (mVelocityInfo == null)
            {
                mVelocityInfo = this.GetComponent <JCS_VelocityInfo>();
            }
            if (mAbilityFormat == null)
            {
                mAbilityFormat = this.GetComponent <JCS_AbilityFormat>();
            }
            if (mAttackRecorder == null)
            {
                mAttackRecorder = this.GetComponent <JCS_AttackerRecorder>();
            }

            // auto detect to see if this gameobject player or not.
            JCS_Player p = this.GetComponent <JCS_Player>();

            // if found it return true!
            if (p != null)
            {
                mIsPlayer = true;
            }
            else
            {
                mIsPlayer = false;
            }

            // set hp the same
            mPreCalHP = HP;
        }
示例#8
0
 public void SetJCS2DAnimator(JCS_2DAnimator jcs2dAnimator)
 {
     this.mJCS2DAnimator = jcs2dAnimator;
 }
        /* Functions */
        protected override void Awake()
        {
            base.Awake();

            this.m2DAnimator = this.GetComponent <JCS_2DAnimator>();
        }
        /*******************************************/
        /*           Protected Variables           */
        /*******************************************/

        /*******************************************/
        /*             setter / getter             */
        /*******************************************/

        /*******************************************/
        /*            Unity's function             */
        /*******************************************/
        private void Awake()
        {
            this.m2DAnimator = this.GetComponent <JCS_2DAnimator>();
        }