Пример #1
0
        public static void InitGyro(Critter npc)
        {
            var builder = new CritterBehaviorBuilder(npc);

            builder
                .DoSequence("I am attacked")
                    .Do(new CallReinforcements(BlackboardKeys.Attackers, BlackboardKeys.SeenAttackers, BlackboardKeys.Killers))
            //TODO: maybe run to guard
                .End();

            Global.RegisterBehaviorTask(builder.MainTask);
        }
Пример #2
0
        public static Critter InitBully(IntPtr ptr, bool firstTime)
        {
            Global.Log ("Initializing bully");
            Critter npc = (Critter)ptr;
            CritterBehaviorBuilder builder = new CritterBehaviorBuilder (npc);

            builder
                .DoSequence ()
                    .Do (new BT.Say (FOnline.Say.NormOnHead, "Hello Wasteland!"))
                    .Do (new ChangeDirection ())
                    .Do (new Wait (Time.RealSecond (3), Time.RealSecond (10)))
                .End ();

            Global.RegisterBehaviorTask (builder.MainTask);
            return npc;
        }
Пример #3
0
        /**
         * Init methods for use in Mono
         */
        public static void InitGuard(Critter npc)
        {
            var builder = new CritterBehaviorBuilder(npc);

            builder
                .DoSequence()
                    .Do(new CallReinforcements(BlackboardKeys.Attackers, BlackboardKeys.SeenAttackers, BlackboardKeys.Killers))
                    .Do(new BT.Say(FOnline.Say.NormOnHead, TextMsg.Text, 70140))
                    .Do(new Attack(BlackboardKeys.Attackers))
                .End()
                .DoSelection()
                    .Do(new ProvideReinforcements())
                .End();

            Global.RegisterBehaviorTask(builder.MainTask);
        }
Пример #4
0
        /**
         * Init methods for use in Mono
         */
        public static void InitGuard(Critter npc)
        {
            var builder = new CritterBehaviorBuilder(npc);

            builder
                .DoSequence()
                    .Do(new CallReinforcements(BlackboardKeys.Attackers, BlackboardKeys.SeenAttackers, BlackboardKeys.Killers))
                    .Do(new Attack(BlackboardKeys.Attackers))
                .End()
                .DoSelection()
                    .Do(new ProvideReinforcements())
                .End()
                .DoSequence()
                    .Do(new Patrol(Entire.Patrol))
                    .Do(new LookAround(3, Time.RealSecond(15)))
                .End();

            Global.RegisterBehaviorTask(builder.MainTask);
        }
Пример #5
0
        public static Critter InitPerformanceTestFindCritters(IntPtr ptr, bool firstTime)
        {
            Critter npc = (Critter)ptr;
            CritterBehaviorBuilder builder = new CritterBehaviorBuilder (npc);

            builder
                .DoSequence ()
                    .Do (new FindCritters (Find.KO | Find.OnlyPlayers))
                    .If (new IsInRange (4))
                    .Do (new LookAt ())
                    .Do (new BT.Say (FOnline.Say.Norm, "Knocked down!"))
                    .Do (new Wait (Time.RealSecond (3), Time.RealSecond (10)))
                .End ()
                .DoSequence ()
                    .Do (new ChangeDirection ())
                    .Do (new Wait (Time.RealSecond (5), Time.RealSecond (10)))
                .End ();

            Global.RegisterBehaviorTask (builder.MainTask);
            return npc;
        }