Beispiel #1
0
 public override bool collide(cCritter pother)
 {
     if (base.collide(pother))
     {
         if (pother.IsKindOf("cCritter3DPlayer"))
         {
             Framework.snd.play(Sound.GlassBreaking);
             pother.addScore(12);
             pother.addVelocity(new cVector3(0, 0, -5));
         }
         return(true);
     }
     return(false);
 }
 public override bool collide(cCritter pcritter)
 {
     if (contains(pcritter))                //disk of pcritter is wholly inside my disk
     {
         Framework.snd.play(Sound.Clap);
         pcritter.addScore(100);
         pcritter.addHealth(1);
         pcritter.moveTo(new cVector3(_movebox.Midx, _movebox.Loy + 1.0f,
                                      _movebox.Hiz - 3.0f));
         return(true);
     }
     else
     {
         return(false);
     }
 }