Exemple #1
0
        /* Functions */

        private void Awake()
        {
            mRandomMultiSoundAction = this.GetComponent <JCS_SoundPoolAction>();

            // assign default spawn point
            if (mSpawnPoint == null)
            {
                mSpawnPoint = this.transform;
            }

            // try to get the ability format it own
            if (mAbilityFormat == null)
            {
                this.mAbilityFormat = this.GetComponent <JCS_AbilityFormat>();
            }

            // try to get the detect area action it own
            if (mDetectAreaAction == null)
            {
                this.mDetectAreaAction = this.GetComponent <JCS_DetectAreaAction>();
            }

            // try to get the player
            if (mPlayer == null)
            {
                this.mPlayer = this.GetComponent <JCS_2DSideScrollerPlayer>();
            }
        }
Exemple #2
0
        /* Setter & Getter */

        /* Functions */

        private void Awake()
        {
            this.mSoundPoolAction = this.GetComponent <JCS_SoundPoolAction>();

            // try to get the collider by itself.
            if (mCollider == null)
            {
                mCollider = this.GetComponent <Collider>();
            }
        }