示例#1
0
    private void ActiveAgentChanged(RosBridgeConnector agent)
    {
        var missive = new ActiveAgentMissive
        {
            agent = agent
        };

        Missive.Send(missive);
    }
 private void OnAgentChange(ActiveAgentMissive missive)
 {
     CreateRainEffect();
     agentCamera = missive.agent.Agent.GetComponent <AgentSetup>().FollowCamera;
     currentRainEffects.SetParent(null);
     currentRainEffects.position = agentCamera.transform.position;
     currentRainEffects.rotation = agentCamera.transform.rotation;
     currentRainEffects.SetParent(agentCamera.transform);
 }