Exemple #1
0
 private void Awake()
 {
     if (Instance)
     {
         DestroyImmediate(gameObject);
     }
     else
     {
         Instance = this;
     }
 }
Exemple #2
0
        public void SendEntitySpawn(List <ClientConnectionInfo> connections, Entity entity)
        {
            var entitySpawn = new EntitySpawn
            {
                EntityID = entity.EntityID,
                Position = entity.Position, //TODO: CREATE PROPER PACKET STRUCTURE FOR THIS
                Rotation = entity.Rotation,
            };

            GroupSend(connections, entitySpawn.Create(), ChannelID.Gameplay, true);

            ConsoleUtils.Info("Broadcasted entity spawn");
        }
Exemple #3
0
    // Use this for initialization
    void Start()
    {
        instance = this;

        gameStarted = false;
    }