protected override void Awake() { base.Awake(); UnitTable = SyncData?.UnitTable; Users = SyncData?.UserInfos; PlayerInfo = Singleton.Instance <PlayerInfo>(); MyAgentRemoteManager = Singleton.Instance <MyAgentRemoteManager>(); Events = Singleton.Instance <EventListenersController>(); labelPooling = new Pooling <LightweightLabel>(CreateLabel, 10); Events.On("R_UNIT", R_UNIT_CREATE_UNIT); }
protected override void Start() { base.Start(); events.AddEmiter("S_DEPLOY", S_DEPLOY); //events.On("R_DEPLOY", R_DEPLOY); events.On("R_DEPLOY", delegate(SocketIOEvent obj) { R_DEPLOY(obj); forTest.R_DEPLOY(obj); }); DeployButton.OnClickEvents += OnDeployButton; dbRef = Singleton.Instance <DBReference>(); unitDataReference = Singleton.Instance <AgentRemoteManager>(); wayPointFactory = Singleton.Instance <NodeManagerFactory>(); agentWayPointManager = (SingleWayPointManager)wayPointFactory.GetManager <AgentWayPoint>(NodeManagerFactory.NodeType.Single); }