Exemple #1
0
    public StopActionWhenNoMotivationSystem(Contexts contexts)
    {
        this.context = contexts.core;
        this.command = contexts.command;

        entities = context.GetGroup(CoreMatcher.AllOf(CoreMatcher.Motivation, CoreMatcher.ActiveAction, CoreMatcher.FlatmateId));
    }
    public UpdateOtherRoomOpinionSystem(Contexts contexts)
    {
        this.contexts = contexts;

        actingFlatmates    = contexts.core.GetGroup(CoreMatcher.AllOf(CoreMatcher.FlatmateId, CoreMatcher.ActiveAction, CoreMatcher.CurrentRoom));
        opiniatedFlatmates = contexts.core.GetGroup(CoreMatcher.AllOf(CoreMatcher.Flatmate, CoreMatcher.Opinion, CoreMatcher.CurrentRoom));
    }
 public DecideActionSystem(Contexts contexts)
 {
     context       = contexts.core;
     command       = contexts.command;
     rooms         = context.GetGroup(CoreMatcher.AllOf(CoreMatcher.Room, CoreMatcher.RoomId, CoreMatcher.DirtLevel));
     busyFlatmates = context.GetGroup(CoreMatcher.AllOf(CoreMatcher.Flatmate, CoreMatcher.ActiveAction, CoreMatcher.CurrentRoom));
     flatmates     = context.GetGroup(CoreMatcher.AllOf(CoreMatcher.AIBehaviour, CoreMatcher.Flatmate, CoreMatcher.Motivation, CoreMatcher.Fun, CoreMatcher.CurrentRoom, CoreMatcher.Opinion).NoneOf(CoreMatcher.Player, CoreMatcher.ActiveAction, CoreMatcher.AIDeciding));
 }
    public ApplyDecitionSystem(Contexts contexts)
    {
        context = contexts.core;

        command = contexts.command;

        flatmates = context.GetGroup(CoreMatcher.AllOf(CoreMatcher.AIDeciding, CoreMatcher.CurrentRoom));
    }
Exemple #5
0
 protected override ICollector <CoreEntity> GetTrigger(IContext <CoreEntity> context)
 {
     return(context.CreateCollector(CoreMatcher.AllOf(CoreMatcher.Flatmate, CoreMatcher.Id)));
 }
Exemple #6
0
 public UpdatePositionByVelocitySystem(Contexts contexts)
 {
     _contexts = contexts;
     _context  = _contexts.core;
     _group    = _context.GetGroup(CoreMatcher.AllOf(CoreMatcher.Position, CoreMatcher.Velocity));
 }
 protected override ICollector <CoreEntity> GetTrigger(IContext <CoreEntity> context)
 {
     return(context.CreateCollector(CoreMatcher.AllOf(CoreMatcher.DirtLevel, CoreMatcher.RoomId)));
 }
    public UpdateMotivationSystem(Contexts contexts)
    {
        context = contexts.core;

        entities = context.GetGroup(CoreMatcher.AllOf(CoreMatcher.Flatmate, CoreMatcher.Motivation, CoreMatcher.ActiveAction));
    }
    public UpdateRoomDirtLevelSystem(Contexts contexts)
    {
        this.contexts = contexts;

        rooms = contexts.core.GetGroup(CoreMatcher.AllOf(CoreMatcher.Room, CoreMatcher.RoomId, CoreMatcher.DirtLevel));
    }
 public UpdateEnterRoomDirtynessOpinionSystem(Contexts contexts) : base(contexts.core)
 {
     coreContext = contexts.core;
     flatmates   = coreContext.GetGroup(CoreMatcher.AllOf(CoreMatcher.FlatmateId));
 }
 public DurationTimeoutSystem(Contexts contexts)
 {
     this.context = contexts.core;
     this.command = contexts.command;
     timedObjects = context.GetGroup(CoreMatcher.AllOf(CoreMatcher.ActionDuration, CoreMatcher.FlatmateId));
 }