public CubeManager(ConnectType type = ConnectType.Auto) { this.scanner = new CubeScanner(type); this.connecter = new CubeConnecter(type); this.cubes = new List <Cube>(); this.handles = new List <CubeHandle>(); this.navigators = new List <CubeNavigator>(); this.cubeTable = new Dictionary <string, Cube>(); }
// --- public methods --- public CubeManager(CubeScannerInterface scanner, CubeConnecterInterface connecter) { this.scanner = scanner; this.connecter = connecter; this.cubes = new List <Cube>(); this.handles = new List <CubeHandle>(); this.navigators = new List <CubeNavigator>(); this.cubeTable = new Dictionary <string, Cube>(); }
public CubeScanner(ConnectType type = ConnectType.Auto) { if (ConnectType.Auto == type) { #if (UNITY_EDITOR || UNITY_STANDALONE) this.impl = new SimImpl(); #elif (UNITY_IOS || UNITY_ANDROID || UNITY_WEBGL) this.impl = new RealImpl(); #endif } else if (ConnectType.Simulator == type) { this.impl = new SimImpl(); } else if (ConnectType.Real == type) { this.impl = new RealImpl(); } }
public void SetCubeScanner(CubeScannerInterface scanner) { this.scanner = scanner; }