Skip to content
Snippets Groups Projects
Commit 6312d05c authored by Michael LaFreniere's avatar Michael LaFreniere
Browse files

still tweakin' - added a helper display for clicking portrait

parent 1099f0e4
No related branches found
No related tags found
No related merge requests found
Showing
with 14 additions and 3 deletions
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -14,7 +14,7 @@ public class CameraMovement : MonoBehaviour {
// Update is called once per frame
void Update () {
//changing screen height won't screw the sprites. (mobile capatability, etc.)
cam.orthographicSize = (Screen.height / 100f) / 2f;
cam.orthographicSize = (Screen.height / 150f) / 2f;
//Lerp parameters (from, to, how fast)
if (follow) {
......
......@@ -18,6 +18,7 @@ public class Portrait : MonoBehaviour {
public Image healthBarRed;
private CanvasGroup inventory; // to toggle the panel on and off
private GameObject[] buttons; // to turn + buttons on/off
public CanvasGroup helpText; // the 'CLICK HERE' below portrait
// fields used to set the inventory panel information
// stats
......@@ -58,6 +59,11 @@ public class Portrait : MonoBehaviour {
inventory.alpha = 0;
inventory.interactable = false;
inventory.blocksRaycasts = false;
helpText.interactable = false;
helpText.blocksRaycasts = false;
if (ArenaCombatControl.winCount > 0) {
helpText.alpha = 0;
}
}
void Update() {
......@@ -123,6 +129,8 @@ public class Portrait : MonoBehaviour {
inventory.alpha = 1; // show
inventory.interactable = true;
inventory.blocksRaycasts = true;
// remove the helper text (CLICK HERE)
helpText.alpha = 0;
}
}
}
......@@ -10,6 +10,8 @@ public class DoneButton : MonoBehaviour {
// Use this for initialization
void Start () {
ArenaCombatControl.winCount = 0; // reset win and money to 0 after game over/quit to main menu
Money.coins = 0;
stats = GameObject.Find("CharacterDisplay").GetComponent<PlayerStats>();
canvasGroup = GameObject.Find("errorMessage").GetComponent<CanvasGroup>();
}
......@@ -21,6 +23,7 @@ public class DoneButton : MonoBehaviour {
public void OnClickDone() {
stats.heal(); // spawn with full health - necessary after player portrait implementation
Money.coins = PlayerStats.luck * 2;
if (ChooseCharStats.unallocated == 0 && ChooseCharStats.playerName != null) {
SceneManager.LoadScene("Town01");
......
......@@ -5,7 +5,7 @@ using UnityEngine.UI;
public class Money : MonoBehaviour {
// total coins
private static int coins = PlayerStats.luck * 2;
public static int coins;
public Text coinAmount;
// Use this for initialization
......
No preview for this file type
No preview for this file type
sceneSetups:
- path: Assets/Scenes/arena.unity
- path: Assets/Scenes/CharacterCreator.unity
isLoaded: 1
isActive: 1
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment