private void DrawMoveGUI() { //Draw movement keys if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) { InputAreas.AddInputArea(new Rect(0, Screen.height - Screen.height * 0.25f, Screen.width, Screen.height * 0.25f)); GUI.Button(new Rect(0, Screen.height - Screen.height * 0.25f, Screen.width / 4, Screen.height * 0.25f), "Rotate Left"); GUI.Button(new Rect(Screen.width / 4.0f, Screen.height - Screen.height * 0.25f, Screen.width / 4, Screen.height * 0.25f), "Rotate Right"); GUI.Button(new Rect(Screen.width / 2.0f, Screen.height - Screen.height * 0.25f, Screen.width / 2, Screen.height * 0.25f), "Move Forward"); } //Draw switch to avatar button InputAreas.AddInputArea(new Rect(Screen.width - (Screen.width / 8) * 3.0f, 0, Screen.width / 8, Screen.height / 8)); if (GUI.Button(new Rect(Screen.width - (Screen.width / 8) * 3.0f, 0, Screen.width / 8, Screen.height / 8), "LEAVE SHIP")) { int clickedThingIndex = shipView.UniverseView.Universe.FindClosestRenderedThing(shipView.UniverseObject.Position, 30.0f); if (clickedThingIndex >= 0) { GameLogic.Instace.PlayerLeaveShip(shipView.UniverseView.Universe.GetPlanet((ushort)clickedThingIndex)); } } }
private void DrawMoveGUI() { //Draw movement keys if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) { InputAreas.AddInputArea(new Rect(0, Screen.height - Screen.height * 0.25f, Screen.width, Screen.height * 0.25f)); GUI.Button(new Rect(0, Screen.height - Screen.height * 0.25f, Screen.width / 4, Screen.height * 0.25f), "Left"); GUI.Button(new Rect(Screen.width / 4.0f, Screen.height - Screen.height * 0.25f, Screen.width / 4, Screen.height * 0.25f), "Right"); GUI.Button(new Rect(Screen.width / 2.0f, Screen.height - Screen.height * 0.25f, Screen.width / 2, Screen.height * 0.25f), "Jump"); } //Draw travel button //InputAreas.AddInputArea(new Rect(Screen.width - (Screen.width / 8) * 2.0f, 0, Screen.width / 8, Screen.height / 8)); //if (GUI.Button(new Rect(Screen.width - (Screen.width / 8) * 2.0f, 0, Screen.width / 8, Screen.height / 8), "TRAVEL")) // mode = AvatarInputMode.TravelToPlanet; //Draw edit button InputAreas.AddInputArea(new Rect(Screen.width - Screen.width / 8, 0, Screen.width / 8, Screen.height / 8)); if (GUI.Button(new Rect(Screen.width - Screen.width / 8, 0, Screen.width / 8, Screen.height / 8), "EDIT")) { mode = AvatarInputMode.Edit; editTool = AvatarInputEditTool.None; } //Draw switch to ship button InputAreas.AddInputArea(new Rect(Screen.width - (Screen.width / 8) * 3.0f, 0, Screen.width / 8, Screen.height / 8)); if (GUI.Button(new Rect(Screen.width - (Screen.width / 8) * 3.0f, 0, Screen.width / 8, Screen.height / 8), "BOARD SHIP")) { GameLogic.Instace.PlayerBoardShip(); } }
private void DrawTravelToPlanetGUI() { //Draw cancel button InputAreas.AddInputArea(new Rect(Screen.width - Screen.width / 8, 0, Screen.width / 8, Screen.height / 8)); if (GUI.Button(new Rect(Screen.width - Screen.width / 8, 0, Screen.width / 8, Screen.height / 8), "EXIT\nTRAVEL")) { mode = AvatarInputMode.Move; } GUI.Box(new Rect(0, Screen.height - 50, Screen.width, 50), "Tap on a planet to travel", centeredBoxStyle); }
private void DrawEditGUI() { //Draw toolbar InputAreas.AddInputArea(new Rect(0, Screen.height - Screen.height * 0.25f, Screen.width, Screen.height * 0.25f)); editTool = (AvatarInputEditTool)GUI.Toolbar(new Rect(0, Screen.height - Screen.height * 0.25f, Screen.width, Screen.height * 0.25f - 50), (int)editTool, EditToolNames); GUI.Box(new Rect(0, Screen.height - 50, Screen.width, 50), EditToolTooltips[(int)editTool], centeredBoxStyle); //Draw cancel button InputAreas.AddInputArea(new Rect(Screen.width - Screen.width / 8, 0, Screen.width / 8, Screen.height / 8)); if (GUI.Button(new Rect(Screen.width - Screen.width / 8, 0, Screen.width / 8, Screen.height / 8), "EXIT\nEDIT")) { mode = AvatarInputMode.Move; } }