Initial Commit
This commit is contained in:
commit
ee5c2f922d
2255 changed files with 547750 additions and 0 deletions
18
Assets/Scripts/Systems/Actor/ActorBoundCopySystem.cs
Normal file
18
Assets/Scripts/Systems/Actor/ActorBoundCopySystem.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DefaultNamespace
|
||||
{
|
||||
public class ActorBoundCopySystem : ComponentSystem
|
||||
{
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
Entities.ForEach(
|
||||
(CapsuleCollider2D collider, ref ActorBoundsData actorBounds) =>
|
||||
{
|
||||
var bounds = collider.bounds;
|
||||
actorBounds = new ActorBoundsData { Rect = new Rect(bounds.min, bounds.size) };
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue