void Awake() { _gameManager = FindObjectOfType <GameManager>(); if (_gameManager == null) { Debug.LogError("OOPSALA we have an ERROR!"); } _locationManager = _gameManager._locationManager; if (_locationManager == 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!"); } _cubeBuilder = GetComponentInChildren <CubeBuilder>(); if (_cubeBuilder == 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!"); } _nodeBuilder = GetComponentInChildren <NodeBuilder>(); if (_nodeBuilder == null) { Debug.LogError("OOPSALA we have an ERROR!"); } _mapSettings = GetComponent <MapSettings>(); if (_mapSettings == null) { Debug.LogError("OOPSALA we have an ERROR!"); } }
//////////////////////////////////////////////// //////////////////////////////////////////////// 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 static void AttachMapsToWorldNode(WorldNode worldNode) { Debug.Log("f**k wtf AttachMapsToWorldNode"); int mapCount = 0; foreach (MapNode mapNode in worldNode.mapNodes) { mapNode.entrance = true; MapPieceBuilder.SetWorldNodeNeighboursForDock(worldNode.neighbourVects); // for the ship docks AttachMapToMapNode(mapNode); mapCount++; } }
private static void AttachMapPieceToConnectorNode(ConnectorNode connectNode) { Vector3 nodeVect = connectNode.NodeStaticLocation; int mapSize = connectNode.NodeSize; int rotation = connectNode.NodeStaticRotation; int mapType = connectNode.NodeMapType; int mapPiece = connectNode.NodeMapPiece; GridBuilder.BuildLocationGrid(connectNode, mapSize); List <Vector3> mapPieceNodes = GridBuilder.GetGridNodeStartPositions(); MapPieceBuilder.AttachMapPieceToMapNode(connectNode, mapPieceNodes, mapSize, mapType, mapPiece, rotation); MapPieceBuilder.SetPanelsNeighbours(); //connectNode.mapFloorData = _mapPieceBuilder.GetMapFloorData(); //connectNode.mapVentData = _mapPieceBuilder.GetMapVentData(); }
private static void AttachMapPieceToMapNode(MapNode mapNode) { Vector3 nodeVect = mapNode.NodeStaticLocation; int mapSize = mapNode.NodeSize; int rotation = mapNode.NodeStaticRotation; int mapType = mapNode.NodeMapType; int mapPiece = mapNode.NodeMapPiece; GridBuilder.BuildLocationGrid(mapNode, mapSize); List <Vector3> mapPieceNodes = GridBuilder.GetGridNodeStartPositions(); MapPieceBuilder.AttachMapPieceToMapNode(mapNode, mapPieceNodes, mapSize, mapType, mapPiece, rotation); MapPieceBuilder.SetPanelsNeighbours(); //mapNode.RemoveDoorPanels(); //mapNode.mapFloorData = MapPieceBuilder.MapFloorData; //mapNode.mapVentData = MapPieceBuilder.MapVentData; }
//////////////////////////////////////////////// private static void AttachMapPiecesToWorldNode(WorldNode worldNode) { int mapCount = 0; foreach (MapNode mapNode in worldNode.mapNodes) { mapNode.entrance = true; Vector3 nodeVect = mapNode.NodeStaticLocation; int mapSize = mapNode.NodeSize; int rotation = mapNode.NodeStaticRotation; int mapType = mapNode.NodeMapType; int mapPiece = mapCount; // for the players small ship if (mapCount == 4) { mapNode.playerShipMapPART1 = true; } if (mapCount == 13) { mapNode.playerShipMapPART2 = true; } GridBuilder.BuildLocationGrid(mapNode, mapSize); List <Vector3> mapPieceNodes = GridBuilder.GetGridNodeStartPositions(); MapPieceBuilder.SetWorldNodeNeighboursForDock(worldNode.neighbours); // for the ship docks MapPieceBuilder.AttachMapPieceToMapNode(mapNode, mapPieceNodes, mapSize, mapType, mapPiece, rotation); MapPieceBuilder.SetPanelsNeighbours(); //mapNode.mapFloorData = MapPieceBuilder.MapFloorData; //mapNode.mapVentData = MapPieceBuilder.MapVentData; mapCount++; } //NetWorkManager.NetworkAgent.CmdTellServerToSpawnNetworkNodeContainer(PlayerManager.PlayerAgent.NetID, worldNode.NodeStaticLocation);// <<<< Dont think this should be here GameManager.StartGame(worldNode.NodeStaticLocation); // <<<<<< start the f*****g game bitch }
private static void AttachMapToMapNode(MapNode mapNode) { MapPieceBuilder.BuildMap(mapNode); MapPieceBuilder.SetPanelsNeighbours(); }