// Start is called before the first frame update void Start() { localCasperData = GlobalControl.Instance.savedCasperData; localPlayerData = GlobalControl.Instance.savedPlayerData; Casper.Instance.GetComponentInChildren <Light>().intensity = 0; EnableFire = true; }
public void ResetCasper(bool isAlive) { if (!isAlive) { savedCasperData = new CasperData(); Casper.Instance.localCasperData = savedCasperData; GameObject.Find("ItemPanel").GetComponent <Image>().sprite = null; Casper.Instance.changeHealth(savedCasperData.MaxHealth); } Casper.Instance.transform.position = Vector3.zero; Camera.main.transform.position = new Vector3(0, 0, -10); Casper.Instance.gameObject.SetActive(true); }