123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- using System;
- using UnityEngine;
- public class SABoneCollider : MonoBehaviour
- {
- public SABoneColliderCommon.BoneProperty boneProperty
- {
- get
- {
- return (this.boneColliderProperty == null) ? null : this.boneColliderProperty.boneProperty;
- }
- }
- public SABoneColliderCommon.SplitProperty splitProperty
- {
- get
- {
- return (this.boneColliderProperty == null) ? null : this.boneColliderProperty.splitProperty;
- }
- }
- public SAColliderBuilderCommon.ReducerProperty reducerProperty
- {
- get
- {
- return (this.boneColliderProperty == null) ? null : this.boneColliderProperty.reducerProperty;
- }
- }
- public SAColliderBuilderCommon.ColliderProperty colliderProperty
- {
- get
- {
- return (this.boneColliderProperty == null) ? null : this.boneColliderProperty.colliderProperty;
- }
- }
- public SAColliderBuilderCommon.RigidbodyProperty rigidbodyProperty
- {
- get
- {
- return (this.boneColliderProperty == null) ? null : this.boneColliderProperty.rigidbodyProperty;
- }
- }
- public bool recursivery
- {
- get
- {
- return this.boneProperty != null && this.boneProperty.recursivery;
- }
- }
- public bool modifyNameEnalbed
- {
- get
- {
- return this.boneColliderProperty != null && this.boneColliderProperty.modifyNameEnabled;
- }
- }
- public void ChangeDefaultName(string defaultName)
- {
- bool flag = this._IsModifyName();
- this.defaultName = defaultName;
- if (this.modifyNameEnalbed && flag)
- {
- base.gameObject.name = this._ComputeModifyName();
- }
- }
- public void ChangeModified(bool modified)
- {
- bool flag = this._IsModifyName();
- this.modified = modified;
- if (this.modifyNameEnalbed && flag)
- {
- base.gameObject.name = this._ComputeModifyName();
- }
- }
- public void ChangeModifiedChildren(bool modifiedChildren)
- {
- bool flag = this._IsModifyName();
- this.modifiedChildren = modifiedChildren;
- if (this.modifyNameEnalbed && flag)
- {
- base.gameObject.name = this._ComputeModifyName();
- }
- }
- public void ResetModified()
- {
- bool flag = this._IsModifyName();
- this.modified = false;
- this.modifiedChildren = false;
- if (this.modifyNameEnalbed && flag)
- {
- base.gameObject.name = this._ComputeModifyName();
- }
- }
- public void ResetModifyName()
- {
- if (this.modifyNameEnalbed)
- {
- base.gameObject.name = this._ComputeModifyName();
- }
- }
- public string _ComputeModifyName()
- {
- if (this.modifyNameEnalbed)
- {
- if (this.modified)
- {
- if (string.IsNullOrEmpty(this.defaultName))
- {
- return "*";
- }
- return this.defaultName + "*";
- }
- else if (this.modifiedChildren)
- {
- if (string.IsNullOrEmpty(this.defaultName))
- {
- return "+";
- }
- return this.defaultName + "+";
- }
- }
- if (string.IsNullOrEmpty(this.defaultName))
- {
- return string.Empty;
- }
- return this.defaultName;
- }
- public bool _IsModifyName()
- {
- if (!this.modifyNameEnalbed)
- {
- return false;
- }
- if (string.IsNullOrEmpty(base.gameObject.name))
- {
- return string.IsNullOrEmpty(this._ComputeModifyName());
- }
- return base.gameObject.name == this._ComputeModifyName();
- }
- public SABoneColliderCommon.SABoneColliderProperty boneColliderProperty = new SABoneColliderCommon.SABoneColliderProperty();
- public string defaultName = string.Empty;
- public SABoneColliderCommon.SABoneColliderProperty defaultBoneColliderProperty = new SABoneColliderCommon.SABoneColliderProperty();
- [NonSerialized]
- public SABoneColliderCommon.SABoneColliderProperty edittingBoneColliderProperty;
- public bool modified;
- public bool modifiedChildren;
- [NonSerialized]
- public bool cleanupModified;
- [NonSerialized]
- public bool isDebug;
- }
|