Initial Commit
This commit is contained in:
commit
ee5c2f922d
2255 changed files with 547750 additions and 0 deletions
22
Assets/Scripts/Systems/Weapon/WeaponIKSystem.cs
Normal file
22
Assets/Scripts/Systems/Weapon/WeaponIKSystem.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using Unity.Entities;
|
||||
using UnityEngine.Experimental.U2D.IK;
|
||||
|
||||
namespace DefaultNamespace
|
||||
{
|
||||
[UpdateInGroup(typeof(PresentationSystemGroup)), UpdateAfter(typeof(ActorIkSystem)), UpdateBefore(typeof(ActorMeleeIkSystem))]
|
||||
public class WeaponIKSystem : ComponentSystem
|
||||
{
|
||||
protected override void OnUpdate()
|
||||
{
|
||||
Entities.ForEach(
|
||||
(IKManager2D manager, ref WeaponData weaponData) =>
|
||||
{
|
||||
manager.enabled = false;
|
||||
if (manager.gameObject.activeInHierarchy)
|
||||
{
|
||||
manager.UpdateManager();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue