예제 #1
0
 private void Awake()
 {
     m_scoreSystem  = GameObject.Find("Gameplay Manager").GetComponent <ScoreSystem>();
     m_myUiManager  = GameObject.Find("Canvas").GetComponent <MyUIManager>();
     m_plusScore_10 = GameObject.Find("+10").GetComponent <Animator>();
     m_plusScore_30 = GameObject.Find("+30").GetComponent <Animator>();
 }
 public void OnPointerExit(PointerEventData eventData)
 {
     if (clickable)
     {
         MyUIManager.IHexagonUnhovered(hex);
     }
 }
 public void OnPointerClick(PointerEventData eventData)
 {
     if (eventData.button == PointerEventData.InputButton.Left && clickable)
     {
         MyUIManager.IHexagonClicked(hex);
     }
 }
예제 #4
0
    void Start()
    {
        m_player      = GameObject.FindGameObjectWithTag("Player");
        m_scoreSystem = GetComponent <ScoreSystem>();
        m_myUiManager = GameObject.Find("Canvas").GetComponent <MyUIManager>();

        m_scoreSystem.ResetScore(m_player);
        m_lastHeight = 0;
    }
예제 #5
0
    private void Start()
    {
        m_animator      = GetComponent <Animator>();
        m_rigidBody     = GetComponent <Rigidbody>();
        m_enemyAttack   = GetComponent <EnemyAttack>();
        m_enemyMovement = GetComponent <EnemyMovement>();

        m_playerHealth = GameObject.FindWithTag("Player").GetComponent <PlayerHealth>();
        m_myUiManager  = GameObject.Find("Canvas").GetComponent <MyUIManager>();
    }
예제 #6
0
    void Awake()
    {
        if (Score == null || Timer == null || VictoryPanel == null)
        {
            Debug.LogError("UI manager isn't set correctly");
            Destroy(this.gameObject);
            return;
        }

        Instance = this;
    }
예제 #7
0
    void Awake()
    {
        _instance = this;
        managers  = new List <IGameManager>();

        playerManager = GetComponent <PlayerManager>();
        uiManager     = GetComponent <MyUIManager>();
        itemManager   = GetComponent <ItemManager>();
        audioManager  = GetComponent <MyAudioManager>();

        managers.Add(playerManager);
        managers.Add(uiManager);
        managers.Add(itemManager);
        managers.Add(audioManager);

        StartCoroutine(StartSetupManager());
    }
예제 #8
0
    private void ResetContinue()
    {
        PlayerHealth playerHealth = player.GetComponent <PlayerHealth>();
        GroundCheck  platform     = player.GetComponent <GroundCheck>();
        MyUIManager  uiManager    = GameObject.Find("Canvas").GetComponent <MyUIManager>();

        playerHealth.ResetHealth(player.GetComponent <PlayerData>());

        uiManager.ResetHealthUpdate();

        player.transform.position = new Vector3(platform.lastPlatform.transform.position.x, platform.lastPlatform.transform.position.y + 4f, platform.lastPlatform.transform.position.z);

        //Debug.Log(platform.lastPlatform.transform.position);

        GameOver gameOver = GameObject.Find("Canvas").GetComponent <GameOver>();

        gameOver.ContinueGame();

        Debug.Log(gameObject.name);
        gameObject.SetActive(false);
    }
예제 #9
0
 private void Start()
 {
     m_animator     = GetComponent <Animator>();
     m_playerHealth = GetComponent <PlayerHealth>();
     m_myUiManager  = GameObject.Find("Canvas").GetComponent <MyUIManager>();
 }