示例#1
0
    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);
 }
示例#3
0
 public void OnEnviroDie(EnviroId enviro)
 {
     enviros.Remove(enviro);
 }
 public void CallOnEnviroAppear(EnviroId enviro)
 {
     //Debug.Log("EnviroAppear");
     OnEnviroAppearBasic?.Invoke();
     OnEnviroAppear?.Invoke(enviro);
 }
示例#5
0
 public void OnNewEnviro(EnviroId newEnviro)
 {
     //Debug.Log("NewEnviro");
     enviros.Add(newEnviro);
 }