Пример #1
0
 public override void Activate()
 {
     if (EmergeSound != null) {
         gameObject.audio.clip = EmergeSound;
         gameObject.audio.Play();
     }
     _ui = GameObject.FindGameObjectWithTag("UI").GetComponent<SpiritMeterUI>();
     StartCoroutine(AnimateReveal());
 }
Пример #2
0
    // METHODS -----
    new void Start()
    {
        base.Start();
        _weaponTrail = GetComponentInChildren<TrailRenderer>();
        _attackPlanePoint = GetComponentInChildren<PlaneSpawner>();

        SoundController = GetComponent<RandomSoundPlayer>();

        CollectRadius += 1;

        // TESTING
        AddEffectToWeapons(new Damage(25));

        ui = GameObject.Find("UI").GetComponent<SpiritMeterUI>();
        if (DashEnabled) {
            _dashTrail = GetComponent<TrailRenderer> ();
        }
        _mainCamera = GameObject.FindGameObjectWithTag("MainCamera").camera;
        _reviveHeartPrefab = (GameObject) Resources.Load("ReviveHeart");

        //currentSpiritPower = gameObject.AddComponent<SpiritBungie>();
        //currentSpiritPower = gameObject.AddComponent<SpiritLightning>();
        //currentSpiritPower = gameObject.AddComponent<SpiritPingPong>();
        //currentSpiritPower = gameObject.AddComponent<SpiritImmortal>();

        currentSpiritPower = gameObject.AddComponent<SpiritBungie>();

        aspect = GetComponentInChildren<EntityRig>().Entity.GetAspect("twinhero");

        //Search for menu settings
        GameObject levelInfo = GameObject.Find("LevelCreationInfo");
        if (levelInfo != null) {
            spiritRegen = levelInfo.GetComponent<LevelCreationInfo>().spiritRegen;
            _damageRecievedModifier = levelInfo.GetComponent<LevelCreationInfo>().DamageRecievedModifier;
        }
    }