public override void _Ready() { _stateMachine.AddState(MoveState.GROUNDED, StateGrounded); _stateMachine.AddState(MoveState.AIRBORNE, StateAirborne); _stateMachine.SetInitialState(MoveState.GROUNDED); _owner = Owner as KinematicBody2D; _velocityComponent = GetNode <VelocityComponent>(_velocityComponentPath); _entityAnimationComponent = GetNode <EntityAnimationComponent>(_entityAnimationComponentPath); _weaponSocketComponent = GetNode <WeaponSocketComponent>(_weaponSocketComponentPath); GetNode <Timer>("Timer").Connect("timeout", this, nameof(OnTimerTimeout)); }
public override void _Ready() { _weaponSocketComponent = GetNode <WeaponSocketComponent>(_weaponSocketComponentPath); _aiBehaviorComponent = GetNode <AIBehaviorComponent>(_aiBehaviorComponentPath); _hands = GetNodeOrNull <Hands>(_handsPath ?? string.Empty); }