Tilt Five™ Unity API  1.4.1
GameBoardSettings.cs
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020-2023 Tilt Five, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 using System.Collections;
17 using System.Collections.Generic;
18 using System;
19 using UnityEngine;
20 
21 namespace TiltFive
22 {
23  [System.Serializable]
24  public class GameBoardSettings
25  {
36 
43  public GameboardType gameboardTypeOverride = GameboardType.GameboardType_None;
44 
53 
57  public Vector3 gameBoardCenter => currentGameBoard != null ? currentGameBoard.position : Vector3.zero;
58 
62  public Vector3 gameBoardRotation => currentGameBoard != null ? currentGameBoard.rotation.eulerAngles : Vector3.zero;
63 
67  [Obsolete("Please use Gameboard.TryGetGameboardType() instead.")]
69 
70  public bool copyPlayerOneGameboard = true;
71 
72  internal GameBoardSettings Copy()
73  {
74  return (GameBoardSettings)MemberwiseClone();
75  }
76  }
77 }
Represents the game board.
Definition: GameBoard.cs:29
GameboardType GameboardType
The gameboard configuration, such as LE, XE, or folded XE.
Definition: GameBoard.cs:57
GameboardType gameboardTypeOverride
Overrides which gameboard variant is displayed via the gameboard gizmo in the Unity Editor....
Vector3 gameBoardRotation
The game board rotation or focal rotational offset.
Vector3 gameBoardCenter
The game board position or focal position offset.
GameboardType gameboardType
The gameboard configuration, such as LE, XE, or folded XE.
GameBoard currentGameBoard
The game board is the window into the game world, as well as the origin about which the glasses/wand ...
float gameBoardScale
The game board's scale multiplies the perceived size of objects in the scene.
float localScale
The size of the object as a single float value, rather than a scale vector.
Vector3 position
The position vector for the associated transform.
Quaternion rotation
The rotation vector for the associated transform.
Definition: Log.cs:21
GameboardType
The type of Gameboard being tracked by the glasses