//////////////////////////////////////////////// //////////////////////////////////////////////// void Awake() { if (_instance != null && _instance != this) { Destroy(gameObject); } else { _instance = this; } }
void Awake() { _gameManager = FindObjectOfType <GameManager>(); if (_gameManager == null) { Debug.LogError("OOPSALA we have an ERROR!"); } _worldBuilder = GetComponentInChildren <WorldBuilder>(); if (_worldBuilder == null) { Debug.LogError("OOPSALA we have an ERROR!"); } _gridBuilder = GetComponentInChildren <GridBuilder> (); if (_gridBuilder == null) { Debug.LogError("OOPSALA we have an ERROR!"); } _mapPieceBuilder = GetComponentInChildren <MapPieceBuilder> (); if (_mapPieceBuilder == null) { Debug.LogError("OOPSALA we have an ERROR!"); } _outerZoneBuilder = GetComponentInChildren <OuterZoneBuilder>(); if (_outerZoneBuilder == null) { Debug.LogError("OOPSALA we have an ERROR!"); } _playerShipBuilder = GetComponentInChildren <PlayerShipBuilder>(); if (_playerShipBuilder == null) { Debug.LogError("OOPSALA we have an ERROR!"); } _cubeConnections = GetComponent <CubeConnections> (); if (_cubeConnections == null) { Debug.LogError("OOPSALA we have an ERROR!"); } _mapSettings = GetComponent <MapSettings> (); if (_mapSettings == null) { Debug.LogError("OOPSALA we have an ERROR!"); } }
private void TellClientToSpawnOtherClientShip(NetworkNodeStruct nodeStruct, int playerID) { PlayerShipBuilder.CreatePlayerShip(nodeStruct, playerID); }