public override void _Ready() { _projectileSpawnComponent = GetNode <ProjectileSpawnComponent>("ProjectileSpawnComponent"); _animationPlayer = GetNode <AnimationPlayer>("AnimationPlayer"); _fireRateTimer = GetNode <Timer>("FireRateTimer"); _fireRateTimer.WaitTime = 1f / FireRate; }
public override void _Ready() { base._Ready(); _animatedSprite = GetNodeOrNull <AnimatedSprite>(_animatedSpritePath ?? string.Empty); _projectileSpawnComponent = GetNodeOrNull <ProjectileSpawnComponent>(_projectileSpawnComponentPath ?? string.Empty); _pursueState = GetNodeOrNull(_pursueStateNodePath ?? string.Empty) as IStateExector; _attackIntentComponent = GetNodeOrNull <AttackIntentComponent>(_attackIntentComponentPath ?? string.Empty); _animatedSprite?.Connect("animation_finished", this, nameof(OnAnimationFinished)); }
public override void _Ready() { base._Ready(); _projectileSpawnComponent = GetNodeOrNull <ProjectileSpawnComponent>(_projectileSpawnComponentPath ?? string.Empty); _projectileSpawnComponent.Connect(nameof(ProjectileSpawnComponent.AllSpawned), this, nameof(OnAllSpawned)); }