40 lines
977 B
C#
40 lines
977 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class Mercenary : MonoBehaviour
|
|
{
|
|
|
|
public Text nameText;
|
|
public string name;
|
|
private string language;
|
|
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
language = PlayerPrefs.GetString("language");
|
|
|
|
if(PlayerPrefs.HasKey("language"))
|
|
{
|
|
language = PlayerPrefs.GetString("language");
|
|
if(language == "English")
|
|
{
|
|
name = PlayerPrefs.GetString("name");
|
|
nameText.text = "Mercenary " + name + ",";
|
|
}
|
|
else if(language == "Polish")
|
|
{
|
|
name = PlayerPrefs.GetString("name");
|
|
nameText.text = "Najemniku " + name + ",";
|
|
}
|
|
}
|
|
else{
|
|
name = PlayerPrefs.GetString("name");
|
|
nameText.text = "Mercenary " + name + ",";
|
|
}
|
|
}
|
|
|
|
}
|