Example #1
0
        public override void _Ready()
        {
            base._Ready();
            if (_wanderStateNodePath != null)
            {
                _wanderState = GetNode(_wanderStateNodePath) as IStateExector;
            }

            _animatedSprite       = GetNode <AnimatedSprite>(_animatedSpritePath);
            _spawnAnimationPlayer = GetNode <AnimationPlayer>(_spawnAnimationPlayerPath);
        }
Example #2
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;
            }
        }