mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-28 12:24:47 +00:00
35 lines
888 B
C#
35 lines
888 B
C#
using Unity.Burst;
|
|
using Unity.Entities;
|
|
using Unity.Jobs;
|
|
using Unity.Physics;
|
|
using Unity.Physics.Systems;
|
|
using UnityEngine;
|
|
|
|
namespace Script.battle.mode
|
|
{
|
|
// ISystem version
|
|
[UpdateInGroup(typeof(FixedStepSimulationSystemGroup))]
|
|
[UpdateBefore(typeof(PhysicsSystemGroup))] // Make sure that the running order of systems is correct
|
|
public partial struct GDemo : ISystem
|
|
{
|
|
[BurstCompile]
|
|
public partial struct CastRayJob : IJob
|
|
{
|
|
public PhysicsWorldSingleton World;
|
|
|
|
public void Execute()
|
|
{
|
|
}
|
|
}
|
|
|
|
|
|
[BurstCompile]
|
|
public void OnUpdate(ref SystemState state)
|
|
{
|
|
PhysicsWorldSingleton physicsWorldSingleton = SystemAPI.GetSingleton<PhysicsWorldSingleton>();
|
|
Debug.Log(physicsWorldSingleton.PhysicsWorld.NumBodies);
|
|
}
|
|
|
|
}
|
|
|
|
} |