コード例 #1
0
ファイル: Gamemanager.cs プロジェクト: nasa03/3D-Mining-Game
    public void RefreshBlockList(int playerCurrentLayer)
    {
        blocksFromLayer.Clear();

        currentLayer = currentDimension.getCurrentLayer(playerCurrentLayer);
        layerBlocks  = currentDimension.getBlocksFromLayer(currentLayer);

        // * (!layerBlocks[i].ignoreLuck ? 1 + (player.stats["luck"].finalValue / 100) : 1)

        for (int i = 0; i < layerBlocks.Length; i++)
        {
            blocksFromLayer.Add(layerBlocks[i].blockId, layerBlocks[i].appearance);
        }
    }
コード例 #2
0
 // Returns the blocks that are within that layer
 public LayerBlock[] getBlocksFromLayer(Dimensionlayer layer)
 {
     return(layer.blocks);
 }