Example #1
0
    /// <summary>
    /// 服务员叫可乐时,委托事件才会触发
    /// </summary>
    public bool WaitCola(string food)
    {
        if (food == "可乐")
        {
            temporaryText.text = "这里,我要的可乐";
            ChinarDelegate.Move(gameObject);
            StopCoroutine(ClearText());
            StartCoroutine(ClearText());
            return(true);
        }

        return(false);
    }
Example #2
0
    /// <summary>
    /// 服务员叫汉堡时,委托事件才会触发
    /// </summary>
    public bool WaitHamburger(string food)
    {
        if (food == "汉堡")
        {
            temporaryText.text = "这里,我要汉堡";
            ChinarDelegate.Move(gameObject);
            iTween.MoveTo(GameObject.Find("Hamburger(Clone)"), iTween.Hash("oncomplete", "DestroyHamburger", "oncompletetarget", gameObject, "time", .7f, "x", -13.38, "y", 2.8f, "easetype", iTween.EaseType.easeOutCubic, "delay", 2.4f));
            iTween.ScaleTo(GameObject.Find("Hamburger(Clone)"), iTween.Hash("time", .7f, "scale", new Vector3(0, 0, 0), "easetype", iTween.EaseType.easeOutCubic, "delay", 2.4f));

            StopCoroutine(ClearText());
            StartCoroutine(ClearText());
            return(true);
        }
        return(false);
    }