コード例 #1
0
    ////////////////////////////////////////////////
    ////////////////////////////////////////////////

    void Awake()
    {
        if (_instance != null && _instance != this)
        {
            Destroy(gameObject);
        }
        else
        {
            _instance = this;
        }
    }
コード例 #2
0
    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!");
        }
    }
コード例 #3
0
 private void TellClientToSpawnOtherClientShip(NetworkNodeStruct nodeStruct, int playerID)
 {
     PlayerShipBuilder.CreatePlayerShip(nodeStruct, playerID);
 }