using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class Score : MonoBehaviour {

    [HideInInspector] public int mMultiplication;
    public int mScore;
    Text mMyScore;
    public Text mMyMultiplication;

    void Start()
    {
        mMyScore = GetComponent<Text>();
        ResetMultiplication();
    }

    public void CalculatingScore(int count)
    {
        mScore += (10 * mMultiplication);
        mMyScore.text = mScore.ToString();
        if(count == 12 && mMultiplication != 8)
        {
            mMultiplication *= 2;
            mMyMultiplication.text = mMultiplication + "X";
        }
    }

    public void ResetMultiplication()
    {
        mMultiplication = 1;
        mMyMultiplication.text = mMultiplication + "X";
    }
}
