Skip to content

Commit

Permalink
Add GameOver Script
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirrhaq committed Dec 18, 2018
1 parent d75ed06 commit 4bfc2e2
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Assets/Script/Gameplay/GameOver.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class GameOver : MonoBehaviour {

public bool gameOver;
public Image result;
public Sprite winSprite;
public Sprite loseSprite;

public void GameOverCondition(bool win)
{
result.enabled = true;
if (win)
{
result.sprite = winSprite;
}
else
{
result.sprite = loseSprite;
}
gameOver = true;
}
// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}
}
11 changes: 11 additions & 0 deletions Assets/Script/Gameplay/GameOver.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4bfc2e2

Please sign in to comment.