Esempio n. 1
0
 // Start is called before the first frame update
 void Start()
 {
     // point to the cenrtral game object
     game   = Object.FindObjectOfType <DDOLGameManager>();
     ground = Object.FindObjectOfType <GroundTileManager>();
     LoadDropdown();
 }
Esempio n. 2
0
    private void Awake()
    {
        // init objects
        ground = Object.FindObjectOfType <GroundTileManager>();
        health = Object.FindObjectOfType <PlayerHealth>();
        menuH  = Object.FindObjectOfType <MenuHandler>();
        game   = Object.FindObjectOfType <DDOLGameManager>();

        // run functions to draw / build screen

        Time.timeScale = 1f;
    }
Esempio n. 3
0
    // Start is called before the first frame update
    void Start()
    {
        // init objects
        ground = Object.FindObjectOfType <GroundTileManager>();
        health = Object.FindObjectOfType <PlayerHealth>();
        menuH  = Object.FindObjectOfType <MenuHandler>();
        game   = Object.FindObjectOfType <DDOLGameManager>();

        // set up camera
        myCamera = this.GetComponent <Camera>();
        myCamera.orthographicSize = ZOOM;
        initVectPos          = vectPos = myCamera.transform.position; // get the position of the camera into both vasriables
        cameraMovementSpeed += game.gameDifficulty[0].optionValue;
        Debug.Log("CAMERA START");
    }
Esempio n. 4
0
    private void Awake()
    {
        // init objects
        ground = Object.FindObjectOfType <GroundTileManager>();
        health = Object.FindObjectOfType <PlayerHealth>();
        menuH  = Object.FindObjectOfType <MenuHandler>();
        game   = Object.FindObjectOfType <DDOLGameManager>();

        initTime = Time.time;

        // run functions to draw / build screen
        // set game difficulty
        ground.SetComplexity((GroundTileManager.ETileComplexity)game.gameDifficulty[0].optionValue);

        // build & initialise
        ground.BuildPlatform();
        health.InitialisePlayer();
        health.DrawHeartPrefabs(canvas);

        pauseScreen.SetActive(false);
        Time.timeScale = 1f;
    }