public void RespawnAgent(GameObject agent) { LandSpawnArea sa = agent.GetComponentInParent <LandSpawnArea>(); if (sa != null) { sa.RespawnNPC(agent); } }
public override void InitializeAgent() { base.InitializeAgent(); currentMode = AgentMode.exploring; currentGatherReward = startGatherReward; agentRB = GetComponent <Rigidbody>(); rayPer = GetComponent <RayPerception>(); //myAcademy = myAcademyObj.GetComponent<CivAcademy>(); myArea = GetComponentInParent <LandSpawnArea>(); }