// Update is called once per frame
        void Update()
        {
            if (currentExp >= XPLevelThresholds[currentLevel])
            {
                LevelUp();

                sfxManager.PlaySound("Explosion");
                Instantiate(LevelUpParticleEffect, playerController.transform.position, Quaternion.Euler(Vector3.zero));
            }
        }
示例#2
0
        // Use this for initialization
        void Start()
        {
            myRigidBody         = GetComponent <Rigidbody2D>();
            _playerSpellManager = FindObjectOfType <PlayerSpellManager>();
            spellDirection      = _playerSpellManager.SpellDirection;

            if (!String.IsNullOrEmpty(SpellSoundName))
            {
                _sFXManager = FindObjectOfType <SFXManager>();
                _sFXManager.PlaySound(SpellSoundName);
            }
        }