Пример #1
0
 public override void _Ready()
 {
     base._Ready();
     _attackIntentComponent = GetNodeOrNull <AttackIntentComponent>(_attackIntentComponentPath ?? string.Empty);
     _timer = GetNode <Timer>("Timer");
     _timer.Connect("timeout", this, nameof(OnTimerTimeout));
 }
Пример #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();
            _timer = GetNode <Timer>("Timer");

            _attackIntentComponent = GetNode <AttackIntentComponent>(_attackIntentComponentPath);
            _animatedSprite        = GetNode <AnimatedSprite>(_animatedSpritePath);

            if (_attackStateNodePath != null)
            {
                _attackState = GetNode(_attackStateNodePath) as IStateExector;
            }
        }