void Open() { Minimap.SetActive(false); AudioManager.instance.Play("ChestOpen"); Debug.Log("Loot"); IsOpen = true; this.GetComponent <SpriteRenderer>().sprite = mysprite1; if (Particle != null) { Instantiate(this.Particle, transform.position, Quaternion.identity); } Spawn(); this.GetComponent <Rigidbody2D>().bodyType = RigidbodyType2D.Static; bc.isTrigger = true; EnviroId Enviroid = GetComponent <EnviroId>(); EventController.instance.enviromentEvents.CallOnEnviroDied(Enviroid); Enviroid.id = 3; EventController.instance.enviromentEvents.CallOnEnviroAppear(Enviroid); }
public void CallOnEnviroDied(EnviroId enviro) { OnEnviroDiedBasic?.Invoke(); OnEnviroDied?.Invoke(enviro); }
public void OnEnviroDie(EnviroId enviro) { enviros.Remove(enviro); }
public void CallOnEnviroAppear(EnviroId enviro) { //Debug.Log("EnviroAppear"); OnEnviroAppearBasic?.Invoke(); OnEnviroAppear?.Invoke(enviro); }
public void OnNewEnviro(EnviroId newEnviro) { //Debug.Log("NewEnviro"); enviros.Add(newEnviro); }