Пример #1
0
 private void Block_OnBlockMined(object sender, OnBlockMinedEventArgs blockData)
 {
     deltaMap[blockData.posX, blockData.posY] = 0;
     Player.Instance.AddBlockToInventory(blockData.blockTypeId, 1);
     //Debug.Log("You've mined the x:" + blockData.posX + " y:" + blockData.posY + " block");
     //SaveGame();
 }
Пример #2
0
    public void OnBlockDestroyed(OnBlockMinedEventArgs eventArgs)
    {
        switch (eventArgs.breakerSource)
        {
        case BreakerSources.Drilling:
            Player.Instance.AddBlockToInventory(eventArgs.blockTypeId, 1);
            break;

        case BreakerSources.Powerup:
            break;

        case BreakerSources.WorldEvent:
            break;

        default:
            break;
        }
    }