Beispiel #1
0
    public void NoticeSound(IFloorable target)
    {
        emoticonLove.SetActive(false);
        emoticonScared.SetActive(false);
        emoticonHostile.SetActive(false);
        StopAllCoroutines();
        Vector2 destination = target.GetPos();
        Floor   targetFloor = target.GetFloor();

        StartCoroutine(ChaseSound(destination, targetFloor));
    }
Beispiel #2
0
    void OnTriggerEnter2D(Collider2D coll)
    {
        if (coll.gameObject.GetComponent <StairCase>() != null)
        {
            owner.SetStair(coll.gameObject.GetComponent <StairCase>());
        }
        if (coll.gameObject.GetComponent <SolidGround>() != null)
        {
            owner.SetFloor(coll.gameObject.GetComponent <SolidGround>().floor);
        }
        IFloorable target = coll.gameObject.GetComponent <IFloorable>();

        if (target != null)
        {
            if (target.IsOnStair() && target.GetStair() != null)
            {
                owner.SetStair(target.GetStair());
            }
            else if (!target.IsOnStair() && target.GetFloor() != null)
            {
                owner.SetFloor(target.GetFloor());
            }
        }
    }
Beispiel #3
0
 public void NoticeSound(IFloorable target)
 {
     emoticonLove.SetActive(false);
     emoticonScared.SetActive(false);
     emoticonHostile.SetActive(false);
     StopAllCoroutines();
     Vector2 destination = target.GetPos();
     Floor targetFloor = target.GetFloor();
     StartCoroutine(ChaseSound(destination, targetFloor));
 }