示例#1
0
 public void SaveWithCleared(DeathCounts deathCounts, CoinScore coinScore = null)
 {
     this.deathCounts = deathCounts;
     this.LastCleared = DateTime.Now;
     this.state       = StageState.cleared;
     this.coinScore   = coinScore;
 }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
示例#3
0
    public void OnCoinClicked()
    {
        // Instantiate the CoinPoof Prefab where this coin is located
        // Make sure the poof animates vertically
        // Destroy this coin. Check the Unity documentation on how to use Destroy
        Quaternion rotation        = Quaternion.Euler(270, 0, 0);
        GameObject poof            = (GameObject)Instantiate(CoinPoofPrefab, transform.position, rotation);
        CoinScore  coinScoreScript = (CoinScore)CoinScoreText.GetComponent(typeof(CoinScore));

        coinScoreScript.IncreaseScore();
        // If sound is played from poof, Destroy can be called here.
        // If sound is played by this script, call the PlayAudio() coroutine
        //Destroy (gameObject);
        StartCoroutine(PlayAudio());
    }
示例#4
0
 public void SetCoinScore(CoinScore coinScore)
 {
     this._coinScore = coinScore;
     this.ResetDisplay();
 }
 public void Init(int stageID)
 {
     this.CoinScore = new CoinScore(stageID);
 }
示例#6
0
 public void PlayEndingScoreIncrementSound()
 {
     CoinScore.Play();
 }