/* Setter & Getter */ /* Functions */ private void Awake() { mLiveObject = this.GetComponent <JCS_2DLiveObject>(); if (mLiveObjectAnimator == null) { mLiveObjectAnimator = this.GetComponent <JCS_2DLiveObjectAnimator>(); } }
//======================================== // Unity's function //------------------------------ private void Awake() { mVelocityInfo = this.GetComponent <JCS_VelocityInfo>(); mCharacterControllerInfo = this.GetComponent <JCS_CharacterControllerInfo>(); // try to get the component in the same transform if (mLiveObjectAnimator == null) { mLiveObjectAnimator = this.GetComponent <JCS_2DLiveObjectAnimator>(); } }
/* Functions */ private void Awake() { this.mVelocityInfo = this.GetComponent<JCS_VelocityInfo>(); this.mCharacterControllerInfo = this.GetComponent<JCS_CharacterControllerInfo>(); // try to get the sound if (mSoundPlayer == null) this.mSoundPlayer = this.GetComponent<JCS_SoundPlayer>(); // try to get the component in the same transform if (mAttackRecorder == null) mAttackRecorder = this.GetComponent<JCS_AttackerRecorder>(); if (mLiveObjectAnimator == null) mLiveObjectAnimator = this.GetComponent<JCS_2DLiveObjectAnimator>(); }