示例#1
0
    public void RespawnAgent(GameObject agent)
    {
        LandSpawnArea sa = agent.GetComponentInParent <LandSpawnArea>();

        if (sa != null)
        {
            sa.RespawnNPC(agent);
        }
    }
示例#2
0
 public override void AgentReset()
 {
     wood                = 0;
     currentMode         = AgentMode.exploring;
     currentGatherReward = startGatherReward;
     agentRB.velocity    = Vector3.zero;
     // Agent position reset was managed by the Academy, now moved to LandSpawnArea
     //myAcademy.RespawnAgent(gameObject);
     myArea.RespawnNPC(gameObject);
 }