コード例 #1
0
		////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		internal void Build(MenuState pMenuState, ICustomSegment pCustomSeg, ICustomPalm pCustomPalm) {
			vMenuState = pMenuState;
			vArcState = vMenuState.Arc;
			vLeftRot = Quaternion.identity;
			vRightRot = Quaternion.AngleAxis(180, Vector3.up);

			var palmObj = new GameObject("Palm");
			palmObj.transform.SetParent(gameObject.transform, false);
			vUiPalm = palmObj.AddComponent<UiPalm>();
			vUiPalm.Build(vArcState, pCustomPalm);

			var arcObj = new GameObject("Arc");
			arcObj.transform.SetParent(gameObject.transform, false);
			vUiArc = arcObj.AddComponent<UiArc>();
			vUiArc.Build(vArcState, pCustomSeg);

			vMenuState.OnSideChange += HandleSideChange;
		}
コード例 #2
0
		/*--------------------------------------------------------------------------------------------*/
		public void Start() {
			if ( vFailed ) {
				return;
			}

			vMenuState = new MenuState(InputProvider, NavigationProvider.GetRoot(),
				CustomizationProvider.GetInteractionSettings());

			var menuObj = new GameObject("Menu");
			menuObj.transform.SetParent(gameObject.transform, false);
			vUiMenu = menuObj.AddComponent<UiMenu>();
			vUiMenu.Build(vMenuState, CustomizationProvider, CustomizationProvider);

			var cursorObj = new GameObject("Cursor");
			cursorObj.transform.SetParent(gameObject.transform, false);
			vUiCursor = cursorObj.AddComponent<UiCursor>();
			vUiCursor.Build(vMenuState.Arc, vMenuState.Cursor,
				CustomizationProvider, OptionalCameraReference);

			((HovercastState)State).SetReferences(vMenuState, menuObj.transform, cursorObj.transform);
		}
コード例 #3
0
		/*--------------------------------------------------------------------------------------------*/
		public void SetReferences(MenuState pMenuState, Transform pMenuTx, Transform pCursorTx) {
			vMenuState = pMenuState;
			MenuTransform = pMenuTx;
			CursorTransform = pCursorTx;
		}