Ejemplo n.º 1
0
    private void InitializeGameSystems()
    {
        managers = FindObjectOfType <ManagerSystem>();
        managers.OnManagersInit += HandleOnManagersInit;

        managers.InitManagers();
    }
Ejemplo n.º 2
0
    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(this);
        }
        else
        {
            Destroy(this.gameObject);
        }
        Cursor.visible = false;

        canmove = true;
        time    = "3:41am";
        keys    = new bool[15];
        for (int i = 0; i < keys.Length; i++)
        {
            keys[i] = false;
        }
    }
Ejemplo n.º 3
0
 // Use this for initialization
 void Awake()
 {
     ms = (ManagerSystem) GameObject.Find("Manager").GetComponent(typeof(ManagerSystem));
     hs = (HealthSystem) GameObject.Find("Manager").GetComponent(typeof(HealthSystem));
 }
Ejemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        GameObject managerObj = GameObject.Find("Manager");
        manager = managerObj.GetComponent<ManagerSystem>();
        dijSys = managerObj.GetComponent<DijkstraSystem>();
        assist = managerObj.GetComponent<PlayerAssistanceSystem>();
        abilSys = managerObj.GetComponent<AbilitySystem>();

        selectedCell = selectedMovementCell =  null;
        changedSelectedCell = changedSelectedMovementCell = false;

        rotationScript = (CameraRotationScript)FindObjectOfType (typeof(CameraRotationScript));
    }
Ejemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        player1 = GameObject.Find("Player1");
        player2 = GameObject.Find("Player2");
        managerSys = GameObject.Find("Manager").GetComponent<ManagerSystem>();
        inventSys = GameObject.Find("Manager").GetComponent<InventorySystem>();
        player1AP = player1.GetComponent<PlayerComponent>().actionPoints;
        player2AP = player2.GetComponent<PlayerComponent>().actionPoints;

        //test angaben
        isPlayer1 = managerSys.getPlayerTurn();

        //setStyle
        style = new GUIStyle();

        dijkstra = (DijkstraSystem)FindObjectOfType(typeof(DijkstraSystem));

        if (isPlayer1)
            input = player1.GetComponent<inputSystem>();
        else
            input = player2.GetComponent<inputSystem>();

        figureUpdate();
    }