Esempio n. 1
0
 void Start()
 {
     _creatureInputController = GetComponent <CreatureInputController>();
     _creatureMovement        = GetComponent <CreatureMovement>();
     _creatureManager         = GetComponent <CreatureManager>();
     _characterMovement       = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterMovement>();
 }
Esempio n. 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());
            }
        }