Ejemplo n.º 1
0
    //=====================================================

    #region Private Methods

    void Awake()
    {
        _thisTransform  = transform;
        _rigidbody      = _thisTransform.GetComponent <Rigidbody>();
        _playerMovement = _thisTransform.GetComponent <PlayerMovement>();

        Projector thisProjector = _thisTransform.GetComponentInChildren <Projector>();

        if (thisProjector != null)
        {
            _blobShadow = thisProjector.gameObject;
        }
        else
        {
            _blobShadow = null;
        }

        _audioSource      = _thisTransform.GetComponent <AudioSource>();
        _audioSource.clip = _clipFootstep;
        _clipRespawn      = ResourcesSpellsAndFX.GetAudioClip(eFairy.NULL, "Respawn");

        var name = GameDataManager.Instance.PlayerCurrentFairyName;

        _clipCelebrate = ResourcesSpellsAndFX.GetAudioClip(name, "Celebrate");
        _clipDeath     = ResourcesSpellsAndFX.GetAudioClip(name, "Death");
        _clipInjured   = ResourcesSpellsAndFX.GetAudioClip(name, "Injured");
        //_clipSpell = ResourcesSpellsAndFX.GetAudioClip( name, "Spell" );

        if (_blobShadow != null)
        {
            _blobShadow.SetActive(false);
        }

        ClearCurrentAction();

        _playDelayedSpawnPlayer     = false;
        _resetCameraPositionOnSpawn = false;
    }
Ejemplo n.º 2
0
    //=====================================================

    private static void SetChangeFairyFx()
    {
        _pfbChangeFairyFx = ResourcesSpellsAndFX.GetPrefabFx(GameDataManager.Instance.PlayerCurrentFairyName) as GameObject;
    }
Ejemplo n.º 3
0
    //=====================================================

    private static void SetSpell()
    {
        _pfbCurrentSpell = ResourcesSpellsAndFX.GetPrefabSpell(GameDataManager.Instance.PlayerCurrentFairyName,
                                                               GameDataManager.Instance.PlayerCurrentFairyLevel) as GameObject;
    }