Exemple #1
0
    private void checkInsideBuilding()
    {
        SimulationState ss;

        ss = (GameObject.FindGameObjectWithTag("GameController").
              GetComponent(typeof(SimulationEngineComponentScript))
              as SimulationEngineComponentScript).engine as SimulationState;
        //ss.stdout.Send("Inns: "+ss.inns.Values.ToString());
        int currentNode = (AstarPath.active.GetNearest(this.transform.position).node as GridNode).GetIndex();

        if (SimulationState.getInstance().nodeToInn.ContainsKey(currentNode))
        {
            Inn inn = SimulationState.getInstance().nodeToInn[currentNode];
            inn.heal(this);
        }
    }