public static void addOrUpdate(UnityShip s) { if(NetworkContext.ContainsKey(s.GetHashCode())) { NetworkContext[s.GetHashCode()] = s; } else { NetworkContext.Add(s.GetHashCode(), s); } }
public static void testAdd(UnityShip s, int i) { NetworkContext.Add(i, s); }
public void networkUpdate(UnityShip s) { UnityNetworkManager.Send<int>(1, client, UnityNetworkManager.BuildMessage); UnityNetworkManager.Send<Vector3>(s.Position, client, UnityNetworkManager.BuildMessage); }
public Ship(UnityShip ship) {JustEntered = false; frame = Animation.frame; Velocity = Vector3.up; UnityShip = ship; Steer = Vector3.zero; Separation = Vector3.zero; MaxSpeed = 2f; MaxForce = 2f; Align = Vector3.zero; Acceleration = Vector3.zero; }