public virtual void Init(IClientNetworking client, int entityId) { Client = client; EntityId = entityId; // TODO: Managers? client.AddListener <EntityDestroyPacket>(entityId, OnEntityDestroyPacket); }
public override void Init(IClientNetworking client, int entityId) { base.Init(client, entityId); client.AddListener <WorldEntityPacket>(entityId, OnWorldEntityPacket); client.OnTick += OnTick; positionalTracker.Set(transform.position, transform.rotation); }
public ProxyManager(IClientNetworking client, WorldEntityManager worldEntityManager) { this.client = client; this.worldEntityManager = worldEntityManager; clientSettings = Resources.Load <ClientSettings>("ClientSettings"); client.AddListener <PlayerFullPacket>(OnPlayerFullPacket); }
public override void Init(IClientNetworking client, int entityId) { base.Init(client, entityId); movementController = GetComponent <ProxyNetworkPlayerMovementController>(); moves = new Queue <MovementUpdate>(4); //This helps kick us off at the start, the update relies on having at least 2 movement updates (to calculate the time between them). moves.Enqueue(new MovementUpdate(transform.position, transform.rotation, DateTime.UtcNow.ToUnixMilliseconds())); moves.Enqueue(new MovementUpdate(transform.position, transform.rotation, DateTime.UtcNow.ToUnixMilliseconds())); AdvanceToNextMove(); client.AddListener <WorldEntityPacket>(entityId, OnWorldEntityPacket); }
public WorldEntityManager(IClientNetworking client) { this.client = client; worldEntities = new Dictionary <int, ClientWorldEntity>(); client.AddListener <EntityDestroyPacket>(OnEntityDestroy); }
public override void Init(IClientNetworking client, int entityId) { base.Init(client, entityId); client.AddListener <NPC_BlackBoard>(entityId, ReceiveBBPacket); client.AddListener <NPC_BTState>(entityId, ReceiveBTPacket); }
public ClientNPCManager(IClientNetworking client, WorldEntityManager worldEntityManager) { this.client = client; this.worldEntityManager = worldEntityManager; client.AddListener <NPCFullPacket>(OnNPCFullPacket); }