public override void SetupOperators(Blackboard context)
        {
            MoveToEntityOperator moveOperator = new MoveToEntityOperator(Owner, Target, 0, 0);
            float waitTime = 3f;

            ActionOperators = new Queue <AiOperator>(new AiOperator[]
            {
                moveOperator,
                new WaitOperator(waitTime),
            });
        }
Ejemplo n.º 2
0
        public override void SetupOperators(Blackboard context)
        {
            MoveToEntityOperator moveOperator = new MoveToEntityOperator(Owner, Target);
            float waitTime = 3f;

            ActionOperators = new Queue <AiOperator>(new AiOperator[]
            {
                moveOperator,
                new SpeakOperator(Owner, Loc.GetString("medibot-start-inject")),
                new WaitOperator(waitTime),
                new InjectOperator(Owner, Target),
            });
        }
        public override void SetupOperators(Blackboard context)
        {
            _moveOperator             = new MoveToEntityOperator(Owner, _entity);
            _moveOperator.MovedATile += InLos;

            // TODO: Accuracy in blackboard
            ActionOperators = new Queue <AiOperator>(new AiOperator[]
            {
                _moveOperator,
                new ShootAtEntityOperator(Owner, _entity, 0.7f),
            });

            InLos();
        }
        public override void SetupOperators(Blackboard context)
        {
            _moveOperator             = new MoveToEntityOperator(Owner, _entity);
            _moveOperator.MovedATile += InLos;

            // TODO: Accuracy in blackboard
            ActionOperators = new Queue <AiOperator>(new AiOperator[]
            {
                _moveOperator,
                new ShootAtEntityOperator(Owner, _entity, 0.7f),
            });

            // We will do a quick check now to see if we even need to move which also saves a pathfind
            InLos();
        }
Ejemplo n.º 5
0
        public override void SetupOperators(Blackboard context)
        {
            var moveOperator = new MoveToEntityOperator(Owner, _entity);
            var equipped     = context.GetState <EquippedEntityState>().GetValue();

            if (equipped != null && equipped.TryGetComponent(out MeleeWeaponComponent meleeWeaponComponent))
            {
                moveOperator.DesiredRange = meleeWeaponComponent.Range - 0.01f;
            }

            ActionOperators = new Queue <AiOperator>(new AiOperator[]
            {
                moveOperator,
                new SwingMeleeWeaponOperator(Owner, _entity),
            });
        }
        public override void SetupOperators(Blackboard context)
        {
            MoveToEntityOperator moveOperator;

            if (IoCManager.Resolve <IEntityManager>().TryGetComponent(Owner, out MeleeWeaponComponent? unarmedCombatComponent))
            {
                moveOperator = new MoveToEntityOperator(Owner, Target, unarmedCombatComponent.Range - 0.01f);
            }
            // I think it's possible for this to happen given planning is time-sliced?
            // TODO: At this point we should abort
            else
            {
                moveOperator = new MoveToEntityOperator(Owner, Target);
            }

            ActionOperators = new Queue <AiOperator>(new AiOperator[]
            {
                moveOperator,
                new UnarmedCombatOperator(Owner, Target),
            });
        }
Ejemplo n.º 7
0
        public override void SetupOperators(Blackboard context)
        {
            MoveToEntityOperator moveOperator;
            var equipped = context.GetState <EquippedEntityState>().GetValue();

            if (equipped != default && IoCManager.Resolve <IEntityManager>().TryGetComponent(equipped, out MeleeWeaponComponent? meleeWeaponComponent))
            {
                moveOperator = new MoveToEntityOperator(Owner, Target, meleeWeaponComponent.Range - 0.01f);
            }
            else
            {
                // TODO: Abort
                moveOperator = new MoveToEntityOperator(Owner, Target);
            }

            ActionOperators = new Queue <AiOperator>(new AiOperator[]
            {
                moveOperator,
                new SwingMeleeWeaponOperator(Owner, Target),
            });
        }
Ejemplo n.º 8
0
        public override void SetupOperators(Blackboard context)
        {
            MoveToEntityOperator moveOperator;

            if (Owner.TryGetComponent(out UnarmedCombatComponent unarmedCombatComponent))
            {
                moveOperator = new MoveToEntityOperator(Owner, _entity, unarmedCombatComponent.Range - 0.01f);
            }
            // I think it's possible for this to happen given planning is time-sliced?
            // TODO: At this point we should abort
            else
            {
                moveOperator = new MoveToEntityOperator(Owner, _entity);
            }

            ActionOperators = new Queue <AiOperator>(new AiOperator[]
            {
                moveOperator,
                new UnarmedCombatOperator(Owner, _entity),
            });
        }
        public override void SetupOperators(Blackboard context)
        {
            var equipped = context.GetState <EquippedEntityState>().GetValue();
            MoveToEntityOperator moveOperator;

            if (equipped != null && equipped.TryGetComponent(out MeleeWeaponComponent meleeWeaponComponent))
            {
                moveOperator = new MoveToEntityOperator(Owner, _entity, meleeWeaponComponent.Range - 0.01f);
            }
            // I think it's possible for this to happen given planning is time-sliced?
            // TODO: At this point we should abort
            else
            {
                moveOperator = new MoveToEntityOperator(Owner, _entity);
            }

            ActionOperators = new Queue <AiOperator>(new AiOperator[]
            {
                moveOperator,
                new SwingMeleeWeaponOperator(Owner, _entity),
            });
        }