package com.yutian.minerwar.data;

import tools.GameUtil;

public class LikeData {

    private String effectKey;
    private int needAmount;
    private int nowAmount;
    private String sound;

    public LikeData(String effectKey, int needAmount, String sound){
        this.effectKey = effectKey;
        this.needAmount = needAmount;
        this.nowAmount = 0;
        this.sound = sound;
    }

    public String getEffectKey() {
        return effectKey;
    }

    public boolean meetTheQuantityRequirement(){
        if(nowAmount >= needAmount){
            return true;
        }
        return false;
    }

    public int getNeedAmount() {
        return needAmount;
    }

    public int getNowAmount() {
        return nowAmount;
    }

    public void addNowAmount(int amount){
        setNowAmount(getNowAmount()+amount);
    }

    public void setNowAmount(int nowAmount) {
        this.nowAmount = nowAmount;
    }
    public void OutPlaySoundsEvent() {
        GameUtil.sendAllSound(this.sound);
    }
}
