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