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