using System.Collections; using System.Collections.Generic; using UnityEngine; /// /// 在重力影响下能够自行归位的门 /// public class FixationDoor : FixedAbs { protected override void Awake() { base.Awake(); } public override void Grabbed() { Debug.Log("DoorOn Drag"); } public override void UnGrabbed() { Debug.Log("DoorOn UnDrag"); } // Update is called once per frame void FixedUpdate() { if (CurrentFixedState== FixedStateEnum.Free) { onFixedPos = this.transform.localEulerAngles == Vector3.zero;// } } }