Added char information in creation, fixed tooltips, v.1.1.1
This commit is contained in:
parent
2effcd1208
commit
220ec2eadc
File diff suppressed because it is too large
Load Diff
@ -96,11 +96,15 @@ public class AudioHandler : MonoBehaviour
|
||||
public void changeVolumeMusic()
|
||||
{
|
||||
cameraAudio.volume = GameObject.Find("slideMusic").GetComponent<Slider>().value;
|
||||
int volume = (int)(cameraAudio.volume * 100);
|
||||
GameObject.Find("txtMusic").GetComponent<Text>().text = "Music (" + volume + "%)";
|
||||
}
|
||||
|
||||
public void changeVolumeEffects()
|
||||
{
|
||||
playerAudio.volume = GameObject.Find("slideEffects").GetComponent<Slider>().value;
|
||||
int volume = (int)(playerAudio.volume * 100);
|
||||
GameObject.Find("txtEffects").GetComponent<Text>().text = "Effects (" + volume + "%)";
|
||||
}
|
||||
|
||||
public void setSlider()
|
||||
|
||||
@ -22,7 +22,7 @@ namespace Assets.Scripts
|
||||
public void startGame()
|
||||
{
|
||||
audioHandler.playButtonClick();
|
||||
uihandler.openTutorial();
|
||||
uihandler.openIntroduction();
|
||||
}
|
||||
|
||||
public void closeGame()
|
||||
@ -114,6 +114,12 @@ namespace Assets.Scripts
|
||||
uihandler.closeOptions();
|
||||
}
|
||||
|
||||
public void closeIntroduction()
|
||||
{
|
||||
audioHandler.playButtonClick();
|
||||
uihandler.openTutorial();
|
||||
}
|
||||
|
||||
public void closeTutorial()
|
||||
{
|
||||
audioHandler.playButtonClick();
|
||||
|
||||
@ -158,6 +158,10 @@ namespace Assets.Scripts
|
||||
private void healPlayer()
|
||||
{
|
||||
health = health + 30 / (difficulty + 1);
|
||||
if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.S))
|
||||
{
|
||||
health = health + 5;
|
||||
}
|
||||
if (health >= maxHealth)
|
||||
{
|
||||
health = maxHealth;
|
||||
|
||||
@ -23,8 +23,9 @@ namespace Assets.Scripts
|
||||
public GameObject pauseMenu;
|
||||
public GameObject playerHUD;
|
||||
public GameObject questlog;
|
||||
public GameObject tutorial;
|
||||
public GameObject introduction;
|
||||
public GameObject tooltip;
|
||||
public GameObject tutorial;
|
||||
|
||||
public UIState state;
|
||||
|
||||
@ -566,10 +567,30 @@ namespace Assets.Scripts
|
||||
bar.GetComponent<RectTransform>().offsetMax = new Vector2(-change, bar.GetComponent<RectTransform>().offsetMax.y);
|
||||
}
|
||||
|
||||
public void openIntroduction()
|
||||
{
|
||||
hideOtherElements(introduction);
|
||||
state = UIState.TUTORIAL;
|
||||
}
|
||||
|
||||
public void openTutorial()
|
||||
{
|
||||
hideOtherElements(tutorial);
|
||||
state = UIState.TUTORIAL;
|
||||
}
|
||||
|
||||
public void updateCreationInformation()
|
||||
{
|
||||
setPlayerInformation();
|
||||
|
||||
// health, maxHealth, secondary, maxSecondary, strength, dexterity, intelligence, level, experience, maxExperience, points
|
||||
int[] playerstats = GameObject.Find("Player").GetComponent<Player>().getStats();
|
||||
|
||||
GameObject.Find("txtStrength_Creation").GetComponent<Text>().text = "Strength: " + playerstats[4];
|
||||
GameObject.Find("txtDexterity_Creation").GetComponent<Text>().text = "Dexterity: " + playerstats[5];
|
||||
GameObject.Find("txtIntelligence_Creation").GetComponent<Text>().text = "Intelligence: " + playerstats[4];
|
||||
GameObject.Find("txtHealth_Creation").GetComponent<Text>().text = "Health: " + playerstats[1];
|
||||
GameObject.Find("txtSecondary_Creation").GetComponent<Text>().text = "Mana: " + playerstats[3];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user