Exemple #1
0
 // Use this for initialization
 void Awake()
 {
     m_myRigidBody    = GetComponent <Rigidbody>();
     m_myRenderer     = GetComponent <Renderer>();
     m_playerLayer    = LayerMask.NameToLayer("Player");
     gameObject.layer = m_playerLayer;
     m_baseMat        = m_myRenderer.material;
     m_mainCameraRef  = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <FollowCenter>();
 }
Exemple #2
0
    private void CreateWinConditionFromDifficulty()
    {
        int m_total    = m_minObjective + m_difficulty * m_objectsPerDifficulty;
        int m_minTrees = Mathf.Min(((m_total * 2) / 3) + 1, m_total - 1);

        m_treesNeeded = m_minTrees + rand.Next(0, m_total - m_minTrees);
        m_ringsNeeded = m_total - m_treesNeeded;
        StartTimer();
        SetObjectiveText();
        m_camera = Camera.main == null ? null : Camera.main.GetComponent <FollowCenter>();
    }
Exemple #3
0
 private void Awake()
 {
     m_mainCameraRef = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <FollowCenter>();
 }
Exemple #4
0
 // Use this for initialization
 void Start()
 {
     m_camera = Camera.main.GetComponent <FollowCenter>();
     m_breath = transform.parent.GetComponent <BreathFire>();
 }
Exemple #5
0
 // Use this for initialization
 void Awake()
 {
     m_gameOverText      = m_gameOverRef.GetComponentInChildren <Text>();
     m_mainCameraRef     = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <FollowCenter>();
     m_powerUpManagerRef = GameObject.FindGameObjectWithTag("PowerUpManager").GetComponent <PowerUpManager>();
 }
Exemple #6
0
 private void Awake()
 {
     m_camera   = Camera.main.GetComponent <FollowCenter>();
     m_renderer = GetComponent <Renderer>();
 }