コード例 #1
0
ファイル: HealthSystem.cs プロジェクト: georgesuarez/CSE-441
    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        var job = new HealthJob
        {
            CommandBuffer = m_EntityCommandBufferSystem.CreateCommandBuffer(),
            rightClick    = GetSingleton <SingletonMouseInput>().RightClickDown
        }.ScheduleSingle(this, inputDeps);

        m_EntityCommandBufferSystem.AddJobHandleForProducer(job);

        return(job);
    }
コード例 #2
0
    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        var job = new HealthJob
        {
            commandBuffer = m_Barrier.CreateCommandBuffer().ToConcurrent()
        };

        var jobHandle = job.Schedule(this, inputDeps);

        jobHandle.Complete();

        return(jobHandle);
    }