Esempio n. 1
0
 public override void Activate()
 {
     if (tPlayer.IsInPossesion())
     {
         tPlayer.SetState(new PSWithBall());
     }
     else
     {
         tPlayer.SetState(new PSWithoutBall());
     }
 }
Esempio n. 2
0
 protected override void NetworkCallback(NetworkMessage message)
 {
     if (message.type == 5 && message.ip == IP)
     {
         PlayerStateMessage m = PlayerStateMessage.GetMessage(message.message);
         player.SetState(m.state, m.atkState);
     }
     else if (message.type == 6 && message.ip == IP)
     {
         PlayerHurtMessage m = PlayerHurtMessage.GetMessage(message.message);
         player.ReduceHP(m.hurt);
     }
     else if (message.type == 18 && message.ip == IP)
     {
         player.Shoot();
     }
 }