Пример #1
0
        //  overload
        public override void Update()
        {
            base.Update();   //  count for life
            //delta
            IPair delta = new IPair();

            if (move_vector_ != null)
            {
                delta.Add(move_vector_);
            }
            delta.Add(repulse_);
            pos_.Add(delta);
            if (GameDef.CollisionWall(pos_, Radius))
            {
                Explode = true;
            }
            //if (delta.Zero()) Explode = true;
            //  effect update
            if (effect_list_ != null)
            {
                foreach (Effect effect in effect_list_)
                {
                    //  特效也會做平移
                    effect.Pos.Add(delta);  //  effect update 由 list 執行
                }
            }
        }