Exemplo n.º 1
0
 //被碰撞到
 public virtual void BeContact(LiveObject ContactObj)
 {
     if (beContactDeal != null)
     {
         beContactDeal(ContactObj);
     }
 }
Exemplo n.º 2
0
 //主动碰撞到
 public virtual void ToContact(LiveObject ContactObj)
 {
     if (toContactDeal != null)
     {
         toContactDeal(ContactObj);
     }
 }
Exemplo n.º 3
0
 public override void ToContact(LiveObject ContactObj)
 {
     this.HP =0;
     base.ToContact (ContactObj);
 }
Exemplo n.º 4
0
 public override void ToContact(LiveObject ContactObj)
 {
     DebugScene.Instance.WriteLine("a12s","Spaceship Contact!");
     base.ToContact (ContactObj);
 }
Exemplo n.º 5
0
        public override void BeContact(LiveObject ContactObj)
        {
            DebugScene.Instance.WriteLine("a12s","Spaceship Contact!");
            if(ContactObj is BBullet)
            {
                this.HP -=((BBullet)ContactObj).Att;
            }
            if(ContactObj is BMissile)
            {
                this.HP -=((BMissile)ContactObj).Att;
            }
            if(ContactObj is BBomb)
            {
                this.HP -=((BBomb)ContactObj).Att;
            }

            base.BeContact (ContactObj);
        }
Exemplo n.º 6
0
 //主动碰撞到
 public virtual void ToContact(LiveObject ContactObj)
 {
     if (toContactDeal != null)
         toContactDeal (ContactObj);
 }
Exemplo n.º 7
0
 //被碰撞到
 public virtual void BeContact(LiveObject ContactObj)
 {
     if (beContactDeal != null)
         beContactDeal (ContactObj);
 }
Exemplo n.º 8
0
 public void Add(LiveObject liveObject)
 {
     ContactObjectList [(int)liveObject.CType].Add(liveObject);
 }
Exemplo n.º 9
0
 public void Add(LiveObject liveObject)
 {
     ContactObjectList [(int)liveObject.CType].Add (liveObject);
 }
Exemplo n.º 10
0
 public override void BeContact(LiveObject ContactObj)
 {
     Speed = 0;
     rotation =0.44f;
     isBomb = true;
     base.BeContact (ContactObj);
 }
Exemplo n.º 11
0
 public override void BeContact(LiveObject ContactObj)
 {
     if(ContactObj is BBullet)
     {
         this.HP -=((BBullet)ContactObj).Att;
     }
     if(ContactObj is BMissile)
     {
         this.HP -=((BMissile)ContactObj).Att;
     }
     if(ContactObj is BBomb)
     {
         this.HP -=((BBomb)ContactObj).Att;
     }
 }