예제 #1
0
 private void ShotFired(Player voPlayer)
 {
     //System.Media.SystemSounds.Beep.Play();
     // trigger – hier kann dass script getriggert werden.
     if (FireEvent != null)
         FireEvent();
 }
예제 #2
0
 private void PlayerEntered(Player voPlayer)
 {
     voPlayer.PlayerRenamed += this.PlayerRenamed;
     voPlayer.ShotFired += this.ShotFired;
 }
예제 #3
0
 private void PlayerRenamed(Player voPlayer)
 {
     // sollte eine freund/feind unterscheidung notwendig werden, kann das hier abgefragt werden
 }
예제 #4
0
파일: Main.cs 프로젝트: SuperTux88/ScubyNet
 private void PlayerShot(Player p)
 {
     //if (!p.IsFriend)
     //	Console.WriteLine("Player " + p.Name + "(" + p.ID + ") fired a shot");
     //else
         p.Shot.ShotCeased += ShotCease;
 }
예제 #5
0
 private double GetDiffToEntity(Player me, Entity e)
 {
     double dRet = EMin?double.MaxValue:double.MinValue;
     switch (EntityOrder) {
     case EOrder.DISTANCE: dRet = me.Position.VirtualDistanceTo(e.Position); break;
     case EOrder.ANGLE: Console.WriteLine("IMPLEMENT ANGLE DIFF"); break;
     case EOrder.TIME: Console.WriteLine("IMPLEMENT TIME DIFF"); break;
     }
     return dRet;
 }
예제 #6
0
파일: Main.cs 프로젝트: SuperTux88/ScubyNet
 private void PlayerRenamed(Player p)
 {
     Console.WriteLine("Player " + p.ID + " renamed to " + p.Name);
 }
예제 #7
0
파일: Main.cs 프로젝트: SuperTux88/ScubyNet
 private void PlayerLeft(Player p)
 {
     Console.WriteLine("Player " + p.Name + "(" + p.ID + ") left the game");
 }
예제 #8
0
파일: Main.cs 프로젝트: SuperTux88/ScubyNet
 private void PlayerEntered(Player p)
 {
     Console.WriteLine("Player " + p.Name + "(" + p.ID + ") entered the game");
     p.PlayerLeft += PlayerLeft;
     p.ShotFired += PlayerShot;
     p.PlayerRenamed += PlayerRenamed;
 }
예제 #9
0
 public Player GetPlayer(long id)
 {
     Player oRet = null;
     if (mcoPlayers.ContainsKey(id)) {
         oRet = mcoPlayers[id];
     } else {
         oRet = new Player(this, id);
         mcoPlayers.Add(id, oRet);
         PlayerEntered(oRet);
     }
     return oRet;
 }
예제 #10
0
 private void PlayerEntered(Player p)
 {
     if (FireEvent != null)
         FireEvent();
 }