示例#1
0
    private void Awake()
    {
        var bounds = TilePrefab.GetComponent <Renderer>().bounds;

        edgeLength = bounds.size.x / 2;
        persistor  = GameObject.FindGameObjectWithTag("GameStatsPersistor").GetComponent <GameStatsPersistor> ();
        GameStats  = persistor.GameStats;
        mapData    = GameStats.DungeonMap;
        mapData.CommitMovement();
    }
示例#2
0
    void Awake()
    {
                #if UNITY_EDITOR
        DebugHelper.CreateGameStatsPersistor();
                #endif

        this.GameStatsPersistor = GameObject.FindGameObjectWithTag("GameStatsPersistor")
                                  .GetComponent <GameStatsPersistor> ();
        this.GameStats = this.GameStatsPersistor.GameStats;

        GameObject.Find("Button").GetComponent <Button> ().onClick.AddListener(() => {
            SceneManager.LoadScene("mapScene");
        });
    }
示例#3
0
    // Use this for initialization
    void Start()
    {
#if UNITY_EDITOR
        DebugHelper.CreateGameStatsPersistor();
#endif

        this.GameStatsPersistor = GameObject.FindGameObjectWithTag("GameStatsPersistor")
                                  .GetComponent <GameStatsPersistor> ();
        this.GameStats = this.GameStatsPersistor.GameStats;

        initUIElements();

        startFight();
    }