示例#1
0
    void Awake()
    {
        hoverTile = GameObject.Find("HoverTile");
        mapGrid   = GameObject.Find("Grid").GetComponent <Grid>();

        resourcesDataController = GameObject.Find("GameManager").GetComponent <ResourcesDataController>();
        LevelManagerRef         = GameObject.Find("GameManager").GetComponent <LevelManager>();
    }
示例#2
0
    void Awake()
    {
        mapCreator = GameObject.Find("MapCreator").GetComponent<MapCreator>();
        resourcesDataController = GameObject.Find("GameManager").GetComponent<ResourcesDataController>();
        gameStates = GameObject.Find("GameManager").GetComponent<GameStates>();

        LevelManagerRef = GameObject.Find("GameManager").GetComponent<LevelManager>();
    }
示例#3
0
 void SetReferences()
 {
     UserControlsGo             = GameObject.Find("UserControls");
     UserControlsRef            = UserControlsGo.GetComponent <UserControls>();
     SelectObjectRef            = UserControlsGo.GetComponent <SelectObject>();
     MoveObjectRef              = UserControlsGo.GetComponent <MoveObject>();
     ResourcesDataControllerRef = GetComponent <ResourcesDataController>();
     StateMachineRef            = GetComponent <StateMachine>();
 }
示例#4
0
    void Awake()
    {
        GridRef = GameObject.Find("Grid").GetComponent <Grid>();

        mapCreator = GameObject.Find("MapCreator").GetComponent <MapCreator>();

        resourcesDataController = GameObject.Find("GameManager").GetComponent <ResourcesDataController>();

        transform.GetChild(1).gameObject.GetComponent <SpriteRenderer>().color = WorkplaceColor;

        UserOverrideBuildingActive = true;
    }
示例#5
0
    void SetReferences()
    {
        ResourcesDataControllerRef = GameObject.Find("GameManager").GetComponent <ResourcesDataController>();
        _agentsParent       = GameObject.Find("Agents");
        _agentTargetsParent = GameObject.Find("AgentsTargets");

        AgentMemory = GetComponent <AgentMemory>();

        NeedsManager = GetComponent <AgentNeedsManager>();

        StateMachineRef = GetComponent <AgentStateMachine>();

        DecisionMaker = GetComponent <AgentDecisionMaker>();
    }
示例#6
0
 void Awake()
 {
     ResourcesDataControllerRef = GetComponent <ResourcesDataController>();
     AgentsBorn.SetValue(2);
 }