示例#1
0
 public override void _Ready()
 {
     _projectileSpawnComponent = GetNode <ProjectileSpawnComponent>("ProjectileSpawnComponent");
     _animationPlayer          = GetNode <AnimationPlayer>("AnimationPlayer");
     _fireRateTimer            = GetNode <Timer>("FireRateTimer");
     _fireRateTimer.WaitTime   = 1f / FireRate;
 }
示例#2
0
 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));
 }
示例#3
0
 public override void _Ready()
 {
     base._Ready();
     _projectileSpawnComponent = GetNodeOrNull <ProjectileSpawnComponent>(_projectileSpawnComponentPath ?? string.Empty);
     _projectileSpawnComponent.Connect(nameof(ProjectileSpawnComponent.AllSpawned), this, nameof(OnAllSpawned));
 }