public override bool PlaceAgentInCell(GridAgentBase agent, uint cellId) { GridNode cell = GetNode(cellId) as GridNode; if (cell != null && cell.GetAgent() == null) { agent.cell = cellId; agent.transform.localPosition = GetCellPos(new GridCoords(agent.cell)); cell.SetAgent(agent); return(true); } return(false); }
public bool SetAgent(GridAgentBase agent) { Agent = agent as GridAgentAbstract <GridCoords>; return(Agent != null); }