예제 #1
0
    IEnumerator BanditBleed2()
    {
        Instantiate(Resources.Load <GameObject>("Prefabs/Dialogue/Count_Slash"), NPC2.transform);
        yield return(new WaitForSeconds(.5f));

        Instantiate(Resources.Load <GameObject>("Prefabs/Dialogue/Blood"), NPC2.transform);
        yield return(new WaitForSeconds(1f));

        NPC2.GetComponent <Animator>().Play("M3_NPC_Down_Dead");
    }
예제 #2
0
    IEnumerator MoveBandits()
    {
        NPC.GetComponent <Rigidbody2D>().velocity = new Vector2(-.25f, 0);
        NPC.GetComponent <Animator>().Play("M_NPC_Left_Walk");

        NPC2.GetComponent <Rigidbody2D>().velocity = new Vector2(-.25f, 0);
        NPC2.GetComponent <Animator>().Play("M3_NPC_Left_Walk");

        yield return(new WaitForSeconds(3f));

        NPC.GetComponent <Rigidbody2D>().velocity = new Vector2(0, 0);
        NPC.GetComponent <Animator>().Play("M_NPC_Left_Idle");

        NPC2.GetComponent <Rigidbody2D>().velocity = new Vector2(0, 0);
        NPC2.GetComponent <Animator>().Play("M3_NPC_Left_Idle");
        yield return(new WaitForEndOfFrame());
    }