コード例 #1
0
    private void HarvestLightFromTile(GameObject tile)
    {
        TileData script        = tile.GetComponent <TileData>();
        int      lightGathered = script.GatherLightFromTile(1);

        if (lightGathered == 0)
        {
            // Stop gathering, no light left in Tile.
            _IsHarvesting = false;
        }
        else
        {
            _HarvestedLight += lightGathered;
        }
    }