예제 #1
0
        /// <summary>
        /// 成長チェックをして、基本的な成長処理を実行します。
        /// </summary>
        /// <param name="other">当たり判定データ</param>
        /// <returns>true=発芽 / false=発芽なし</returns>
        protected bool CanGrow(Collider other)
        {
            if ((state == StateType.Nae) && other.CompareTag("Water"))
            {
                state = StateType.Growing;
                anim.SetTrigger("Grow");
                SoundController.Play(growSe);
                GreenPowerEmitter.Emit(transform.position);
                NaeGrowedCount++;
                if (waitGrowDone)
                {
                    WaitGrowCount++;
                }
                return(true);
            }

            return(false);
        }
예제 #2
0
 private void Awake()
 {
     instance = this;
 }