// Use this for initialization void Start() { items = new Dictionary <Item, int>(); health = gameObject.AddComponent <HealthSystem>(); playerController = GetComponent <PlayerController>(); health.setMaxHealth(5); health.ResetHealth(); playerQuestSystem = GetComponent <PlayerQuestSystem>(); SaveSystem.Instance.AddSaveableObject(this); if (File.Exists(Path.Combine(Application.persistentDataPath, "PlayerItems.json"))) { InitDictionary(); } else { items.Clear(); } if (Weapons[1].gameObject.activeSelf) { Destroy(tridentPickup); } }
private void Awake() { questManager = FindObjectOfType <QuestManager>(); playerQuestSystem = FindObjectOfType <PlayerQuestSystem>(); labelText.normal.textColor = Color.black; questProgressStyle.normal.textColor = Color.white; questProgressStyle.fontSize = 25; questProgressStyle.contentOffset = new Vector2(0, -5.0f); questProgressStyle.alignment = TextAnchor.MiddleLeft; }