示例#1
0
    protected override JobHandle OnUpdate(JobHandle inputDependencies)
    {
        ComponentDataFromEntity <SleepArea> sleepAreas = GetComponentDataFromEntity <SleepArea>();
        ComponentDataFromEntity <FoodArea>  foodAreas  = GetComponentDataFromEntity <FoodArea>();

        var ecb = m_EndSimulationEcbSystem.CreateCommandBuffer().ToConcurrent();
        var job = new ExecuteActionJob()
        {
            sleepAreaLookup = sleepAreas,
            foodAreaLookup  = foodAreas,
            ecb             = ecb,
            incrMultiplier  = Experiment.incrMultiplier,
            turnAngle       = Experiment.turnAngleRadian
        };
        var jobHandle = job.Schedule(m_Group, inputDependencies);

        m_EndSimulationEcbSystem.AddJobHandleForProducer(jobHandle);
        return(jobHandle);
    }
示例#2
0
 private static ObjectView CreateView(this XafApplication application, ExecuteActionJob job, IModelView modelView, IObjectSpace space, Type objectType)
 => modelView is IModelListView modelListView
示例#3
0
 private static IObservable <View> CreateView(this XafApplication application, ExecuteActionJob job, IModelView modelView)
 => application.WhenViewCreating()
 .Select(t => {
     var objectType = modelView.AsObjectView.ModelClass.TypeInfo.Type;
     t.e.View       = application.CreateView(job, modelView, application.CreateObjectSpace(objectType, true), objectType);
     return(t.e.View);
 }).FirstAsync().IgnoreElements();