// Use this for initialization
        void Start()
        {
            if (Text == null) Text = GetComponent<UnityEngine.UI.Text>();
            Assert.IsNotNull(Text, "You either have to specify a Text component, or attach the Score Display to a gameobject that contains one.");

            _player = GameManager.Instance.GetPlayer();
            _level = GameManager.Instance.Levels == null ? null : GameManager.Instance.Levels.Selected;
            if (!string.IsNullOrEmpty(LocalisationKey))
                _localisationString = LocaliseText.Get(LocalisationKey);

            UpdateDisplay();
        }
Exemple #2
0
 //parent: parent,
 //, GameItem parent = null)
 public Character(int levelNumber, string name = null, bool localiseName = true, string description = null, bool localiseDescription = true, Sprite sprite = null, int valueToUnlock = -1, Player player = null)
     : base(levelNumber, name: name, localiseName: localiseName, description: description, localiseDescription: localiseDescription, sprite: sprite, valueToUnlock: valueToUnlock, player: player, identifierBase: "Character", identifierBasePrefs: "C")
 {
 }
Exemple #3
0
 //parent: parent,
 //, GameItem parent = null)
 public Level(int levelNumber, string name = null, bool localiseName = true, string description = null, bool localiseDescription = true, Sprite sprite = null, int valueToUnlock = -1, Player player = null, bool loadFromResources = false)
     : base(levelNumber, name: name, localiseName: localiseName, description: description, localiseDescription: localiseDescription, sprite: sprite, valueToUnlock: valueToUnlock, player: player, identifierBase: "Level", identifierBasePrefs: "L", loadFromResources : loadFromResources)
 {
 }
Exemple #4
0
 //parent: parent,
 //, GameItem parent = null)
 public World(int number, string name = null, bool localiseName = true, string description = null, bool localiseDescription = true, Sprite sprite = null, int valueToUnlock = -1, Player player = null)
     : base(number, name: name, localiseName: localiseName, description: description, localiseDescription: localiseDescription, sprite: sprite, valueToUnlock: valueToUnlock, player: player, identifierBase: "World", identifierBasePrefs: "W")
 {
     //SelectedLevel = GameManager.Instance.Player.GetSettingInt(FullKey("SelectedLevel"), -1);
 }