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