/// <summary> /// Set the socket gameobject active and start the display animation (DOScale) /// </summary> /// <param name="socket">socket to display</param> /// <param name="posIndex">positionnal index (used to get socket position from socketsPos array)</param> private void DisplaySocket(WristSocket socket, int posIndex) { GameObject socketObject = socket.gameObject; socketObject.SetActive(true); socketObject.transform.DOScale(1.0f, animDuration).OnComplete(() => { isInAnimation = false; }); GetWristPosAndUp(posIndex, out var pos, out var up); socketObject.transform.up = up; socketObject.transform.DOLocalMove(pos, animDuration); }
public override void OnInspectorGUI() { WristSocket off = (WristSocket)target; DrawDefaultInspector(); }
private void Awake() { wristSocket = GetComponent <WristSocket>(); }