123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using System;
- using System.Collections.Generic;
- using kt.Physics;
- using UnityEngine;
- public class IKColliderMeta : MonoBehaviour
- {
- private void OnDestroy()
- {
- this.AllColliderAction(delegate(ANativeColliderBase col)
- {
- UnityEngine.Object.Destroy(col);
- });
- }
- private void OnEnable()
- {
- this.AllColliderAction(delegate(ANativeColliderBase col)
- {
- col.enabled = true;
- });
- }
- private void OnDisable()
- {
- this.AllColliderAction(delegate(ANativeColliderBase col)
- {
- col.enabled = false;
- });
- }
- private void AllColliderAction(Action<ANativeColliderBase> action)
- {
- if (this.colliderList == null)
- {
- return;
- }
- foreach (ANativeColliderBase anativeColliderBase in this.colliderList)
- {
- if (anativeColliderBase && action != null)
- {
- action(anativeColliderBase);
- }
- }
- }
- [ReadOnly]
- public FullBodyIKMgr.IKEffectorType effectorType;
- public List<ANativeColliderBase> colliderList = new List<ANativeColliderBase>();
- }
|