// Use this for initialization
 void Start()
 {
     playerController    = GetComponent <PlayerController>();
     playerHealthManager = GetComponent <PlayerHealthManager>();
     playerManaManager   = GetComponent <PlayerManaManager>();
     EffectTimer         = EffectDuration;
     InitialSpeed        = playerController.moveSpeed;
 }
Ejemplo n.º 2
0
        // Use this for initialization
        void Start()
        {
            CurrentHp      = HPLevels[1];
            CurrentMana    = ManaLevels[1];
            CurrentAttack  = AttackLevels[1];
            CurrendDefense = DefenseLevels[1];

            playerHealthManager = FindObjectOfType <PlayerHealthManager>();
            playerManaManger    = FindObjectOfType <PlayerManaManager>();
            sfxManager          = FindObjectOfType <SFXManager>();
            playerController    = FindObjectOfType <PlayerController>();
        }
Ejemplo n.º 3
0
        // Use this for initialization
        void Start()
        {
            anim                = GetComponent <Animator>();
            myRigidBody         = GetComponent <Rigidbody2D>();
            sfxManager          = FindObjectOfType <SFXManager>();
            playerHealthManager = GetComponent <PlayerHealthManager>();
            playerManaManager   = GetComponent <PlayerManaManager>();
            playerSpellManager  = GetComponent <PlayerSpellManager>();

            direction = EnumsAndConstants.SpellDirection.None;

            if (!playerExists)
            {
                playerExists = true;
                DontDestroyOnLoad(transform.gameObject);
            }
            else
            {
                Destroy(gameObject);
            }
        }