コード例 #1
0
        public override void Update(float deltaTime)
        {
            bool destroyed = nebulaObject;

            nebulaObject.properties.SetProperty((byte)PS.Ship, new Hashtable {
                { (int)SPC.MaxHealth, mDamagable.maximumHealth },
                { (int)SPC.Health, mDamagable.health },
                { (int)SPC.Destroyed, destroyed }
            });
            nebulaObject.properties.SetProperty((byte)PS.CurrentHealth, mDamagable.health);

            if (fsm.IsState(PirateStationState.Dead))
            {
                if (!destroyFlag)
                {
                    destroyTimer -= deltaTime;
                    if (destroyTimer <= 0f)
                    {
                        destroyFlag = true;
                        (nebulaObject as Item).Destroy();
                    }
                }
            }
        }