コード例 #1
0
    void Start()
    {
        busyTiles = new Dictionary <Vector3, string>();
        busyProps = new Dictionary <Vector3, string>();

        TAP = GameObject.Find("Game Manager").GetComponent <TilesAndProps>();

        tilesLayer = LayerMask.GetMask("Tiles");
        propsLayer = LayerMask.GetMask("Props");

        myCamera = GameObject.Find("Main Camera").GetComponent <Camera>();

        if (GameManager.instance.currentMap != null)
        {
            loadedMapTilesData = GameManager.instance.currentMap.tilesData;
            loadedMapPropsData = GameManager.instance.currentMap.propsData;
            LoadLevel();
        }
        else
        {
            loadedMapTilesData = "0,0,0";
            loadedMapPropsData = "0,0,0";
        }

        mapName.onValueChanged.AddListener(s => mapName.textComponent.color     = Color.black);
        mapAuthor.onValueChanged.AddListener(s => mapAuthor.textComponent.color = Color.black);
    }
コード例 #2
0
    void Start()
    {
        TAP = GameObject.Find("Game Manager").GetComponent <TilesAndProps>();

        tilesLayer = LayerMask.GetMask("Tiles");
        propsLayer = LayerMask.GetMask("Props");


        if (GameManager.instance.currentMap != null)
        {
            loadedMapTilesData = GameManager.instance.currentMap.tilesData;
            loadedMapPropsData = GameManager.instance.currentMap.propsData;
            LoadLevel();
        }
        else
        {
            loadedMapTilesData = "0,0,0";
            loadedMapPropsData = "0,0,0";
        }
    }