public void Open(string agentCode) { AgentInterfacer agentInfo = AgentController.GetAgentInterfacer(agentCode); Imager.sprite = agentInfo.Icon; Texter.text = agentCode.ToString(); gameObject.SetActiveIfNot(true); }
protected override void OnLateApply() { foreach (EnvironmentBodyInfo info in EnvironmentBodies) { info.Body.Initialize(info.Position, info.Rotation); } foreach (EnvironmentObject obj in EnvironmentObjects) { obj.LateInitialize(); } foreach (var agentInfo in EnvironmentAgents) { AgentController.DefaultController.AddAgent(agentInfo.Agent); agentInfo.Agent.Setup(AgentController.GetAgentInterfacer(agentInfo.AgentCode)); agentInfo.Agent.Initialize(agentInfo.Position.ToVector2d(), agentInfo.Rotation); agentInfo.Agent.Body.HeightPos = agentInfo.Position.z; } }
protected override void OnLateApply() { foreach (EnvironmentBodyInfo info in EnvironmentBodies) { info.Body.Initialize(info.Position, info.Rotation); } foreach (EnvironmentObject obj in EnvironmentObjects) { obj.LateInitialize(); } var environmentController = AgentControllerHelper.Instance.GetInstanceManager(AgentControllerHelper.Instance.EnvironmentController); foreach (var agentInfo in EnvironmentAgents) { var agent = agentInfo.Agent; agentInfo.Agent.Setup(AgentController.GetAgentInterfacer(agentInfo.AgentCode)); environmentController.InitializeAgent(agent, agentInfo.Position.ToVector2d(), agentInfo.Rotation); agentInfo.Agent.Body.HeightPos = agentInfo.Position.z; agentInfo.Agent.TypeIndex = AgentController.UNREGISTERED_TYPE_INDEX; } }