// 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>(); }
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>(); }
private void Awake() { m_mainCameraRef = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <FollowCenter>(); }
// Use this for initialization void Start() { m_camera = Camera.main.GetComponent <FollowCenter>(); m_breath = transform.parent.GetComponent <BreathFire>(); }
// 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>(); }
private void Awake() { m_camera = Camera.main.GetComponent <FollowCenter>(); m_renderer = GetComponent <Renderer>(); }