//被碰撞到 public virtual void BeContact(LiveObject ContactObj) { if (beContactDeal != null) { beContactDeal(ContactObj); } }
//主动碰撞到 public virtual void ToContact(LiveObject ContactObj) { if (toContactDeal != null) { toContactDeal(ContactObj); } }
public override void ToContact(LiveObject ContactObj) { this.HP =0; base.ToContact (ContactObj); }
public override void ToContact(LiveObject ContactObj) { DebugScene.Instance.WriteLine("a12s","Spaceship Contact!"); base.ToContact (ContactObj); }
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); }
//主动碰撞到 public virtual void ToContact(LiveObject ContactObj) { if (toContactDeal != null) toContactDeal (ContactObj); }
//被碰撞到 public virtual void BeContact(LiveObject ContactObj) { if (beContactDeal != null) beContactDeal (ContactObj); }
public void Add(LiveObject liveObject) { ContactObjectList [(int)liveObject.CType].Add(liveObject); }
public void Add(LiveObject liveObject) { ContactObjectList [(int)liveObject.CType].Add (liveObject); }
public override void BeContact(LiveObject ContactObj) { Speed = 0; rotation =0.44f; isBomb = true; base.BeContact (ContactObj); }
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; } }