Example #1
0
    void Start()
    {
        screenWidth = Screen.width;
        screenHeight = Screen.height;
        unitsList = new List<Entity>();
        deadUnitsList = new List<Entity>();
        PlayerCam = this.GetComponentInChildren<Camera>();
        _gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>();
        SelectedUnits = new List<Entity>();

        scenarioHandler = GameObject.FindGameObjectWithTag("ScenarioHandler").GetComponent<ScenarioHandler>();

        gateRef = GameObject.FindGameObjectWithTag("GateOfLife").GetComponent<GateOfLife>();
    }
Example #2
0
    void Awake()
    {
        _gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>();
        gateRef = GameObject.FindGameObjectWithTag("GateOfLife").GetComponent<GateOfLife>();
        seeker = this.GetComponent<Seeker>();
        controller = this.GetComponent<CharacterController>();
        originalMaterialColor = this.renderer.material.color;

        animation = this.GetComponent<Animation>();
        if (animation == null) {
            animation = this.GetComponentInChildren<Animation>();
        }

        audioSources = new Dictionary<string, AudioSource>();

        addAudioSource("Attack", AttackSounds);
        addAudioSource("BeingHit", BeingHitSounds);
    }