예제 #1
0
 // Use this for initialization
 void Start()
 {
     if (IsShopInventory)
     {
         gameObject.tag = "Cell_Shop";
     }
     sfxManager = FindObjectOfType <SFXManager>();
     CreateLayout();
     playerController = FindObjectOfType <PlayerController>();
 }
예제 #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>();
        }
예제 #3
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);
            }
        }
예제 #4
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);
            }
        }
예제 #5
0
 // Use this for initialization
 void Start()
 {
     sfxManager = FindObjectOfType <SFXManager>();
 }
예제 #6
0
 // Use this for initialization
 void Start()
 {
     sfxManager = FindObjectOfType <SFXManager>();
     CreateLayout();
     playerController = FindObjectOfType <PlayerController>();
 }