コード例 #1
0
    public IEnumerator vaseCoroutine(string eventName, int vaseNum)
    {
        string target = null;

        if (num == 0)
        {
            target = "vase0";
        }
        else if (num == 1)
        {
            target = "vase1";
        }


        if (eventName == "briser")
        {
            yield return(StartCoroutine(XmlManager.launchEventCoroutine("briser", target)));

            CapitaineXmlScript.scaryValue += 20;
            if (CapitaineXmlScript.scaryValue >= 100)
            {
                yield return(StartCoroutine(XmlManager.launchEventCoroutine("fuite", "capitaine")));

                CapitaineXmlScript.goAway();
            }
        }
        else
        {
            yield return(StartCoroutine(XmlManager.launchEventCoroutine(eventName, target)));
        }
        yield break;
    }
コード例 #2
0
    public IEnumerator pantaloneEventCoroutine(string eventName)
    {
        if (eventName == "soulever_mechamment")
        {
            //CapitaineXmlScript.interrupt();
            yield return(StartCoroutine(XmlManager.launchEventCoroutine("soulever_mechamment", "pantalone")));

            CapitaineXmlScript.scaryValue += 20;
            if (CapitaineXmlScript.scaryValue >= 100)
            {
                yield return(StartCoroutine(XmlManager.launchEventCoroutine("fuite", "capitaine")));

                CapitaineXmlScript.goAway();
            }
        }
        else if (eventName == "pousser_gentiment")
        {
            //CapitaineXmlScript.interrupt();
            yield return(StartCoroutine(XmlManager.launchEventCoroutine("pousser_gentiment", "pantalone")));

            CapitaineXmlScript.scaryValue += 20;
            if (CapitaineXmlScript.scaryValue >= 100)
            {
                yield return(StartCoroutine(XmlManager.launchEventCoroutine("fuite", "capitaine")));

                CapitaineXmlScript.goAway();
            }
        }
        else
        {
            XmlManager.launchEvent(eventName, "pantalone");
        }
        yield break;
    }