示例#1
0
 public override void Destroy()
 {
     Explosion exp = new Explosion(parent, 50);
     exp.Centre = this.Centre;
     parent.AddGameObject(exp);
     base.Destroy();
 }
示例#2
0
        public override void Update()
        {
            base.Update();
            ageTicks++;

            if (ageTicks > lifeSpan)
            {
                this.Expired = true;
            }
            if (spawn)
            {
                Random rand = new Random();
                Explosion exp1 = new Explosion(parent, 5);
                exp1.Centre = this.Centre + new MatrixPoint(rand.NextDouble()*15, rand.NextDouble()*15);
                exp1.spawn = false;
                parent.AddGameObject(exp1);
            }
        }