Esempio n. 1
0
 /// <summary>
 /// Reset all fields to uninitialized state.
 /// </summary>
 internal void Reset()
 {
     burnType           = BurnType.None;
     burnTime           = double.NaN;
     dV                 = double.NaN;
     timeUntil          = double.NaN;
     isInsufficientFuel = false;
 }
Esempio n. 2
0
        // 生成時に呼ばれる初期化
        public override void Initialize()
        {
            base.Initialize();

            currentBurnType = BurnType.Stop;

            AddBurnCount(3);
        }
Esempio n. 3
0
        // 発射させる
        public void Burning(int n)
        {
            // 前準備
            currentBurnType = BurnType.Burning;
            AddBurnCount(n);

            // 初期化
            restBurnCount        = currentRestBurnCount;
            currentRestBurnCount = 0;
        }
Esempio n. 4
0
        //
        public override void UpdateByFrame()
        {
            base.UpdateByFrame();

            if (currentBurnType == BurnType.Burning)
            {
                // 一定間隔で玉を発射している
                time += Time.deltaTime;

                if (time > 0.1f)
                {
                    if (restBurnCount > 0)
                    {
                        // 雑魚を発射する
                        currentSettdBollType = "Zako";

                        // 発射
                        OnBurn();

                        // 消費
                        restBurnCount--;
                    }
                    time = 0;
                }

                // カウントが0になったら止まる
                if (restBurnCount <= 0)
                {
                    currentBurnType = BurnType.Stop;
                }
            }
            if (currentBurnType == BurnType.Stop)
            {
                // 貯める
            }
        }
 /// <summary>
 /// Reset all fields to uninitialized state.
 /// </summary>
 internal void Reset()
 {
     burnType = BurnType.None;
     burnTime = double.NaN;
     dV = double.NaN;
     timeUntil = double.NaN;
     isInsufficientFuel = false;
 }