Ejemplo n.º 1
0
 protected string encodePerson(Person p, string action, Vector3 vel)
 {
     int team = 0;
     if (hospitals[0] == p.team)
     {
         team = 0;
     }
     else
     {
         team = 1;
     }
     string[] info =
     {"general",
         p.tag,
         action,
         p.LocalTransform.Translation.X.ToString(),
         p.LocalTransform.Translation.Y.ToString(),
         p.LocalTransform.Translation.Z.ToString(),
         vel.X.ToString(),
         vel.Y.ToString(),
         vel.Z.ToString(),
         team.ToString()};
     string msg = String.Join(",", info);
     return msg;
 }
Ejemplo n.º 2
0
 protected string encodePerson(Person p, string action)
 {
     return encodePerson(p, action, p.Velocity);
 }