Example #1
0
 private void Start()
 {
     _playerPosition    = GameObject.FindGameObjectWithTag("Player").transform;
     _creatureStats     = GetComponent <CreatureStats>();
     _rb                = GetComponent <Rigidbody2D>();
     _creatureManager   = GetComponent <CreatureManager>();
     _creatureSearching = GetComponent <CreatureSearching>();
     _joystick          = GetComponent <CreatureJoystickDirection>();
     _collision         = GetComponentInChildren <CreatureCollision>();
     _animator          = GetComponent <Animator>();
 }
Example #2
0
        private void Initialize()
        {
            //Init referencies
            _characterMovement = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterMovement>();
            _movement          = GetComponent <CreatureMovement>();
            _input             = GetComponent <CreatureInputController>();
            _animator          = GetComponent <Animator>();
            _joystick          = GetComponent <CreatureJoystickDirection>();
            _vfx       = GetComponent <CreatureVfxHandler>();
            _collision = GetComponentInChildren <CreatureCollision>();

            //Init Creature State
            CurrentState = CreatureState.OnComeBack;

            if (_showDebug)
            {
                CursedDebugger.Instance.Add("State : ", () => CurrentState.ToString());
            }
        }