コード例 #1
0
    IEnumerator DragonEyeTwinke()
    {
        if (mLeftOrRigth)
        {
            TweenWidth.Begin(Dragon_EyeLeft, DragonEyeTime, Dragon_Left_Eye_Tar * 3);
            TweenHeight.Begin(Dragon_EyeLeft, DragonEyeTime, Dragon_Eye_Min_Height);
            yield return(new WaitForSeconds(DragonEyeTime));

            TweenWidth.Begin(Dragon_EyeLeft, DragonEyeTime, Dragon_Left_Eye_Src);
            TweenHeight.Begin(Dragon_EyeLeft, DragonEyeTime, Dragon_Eye_Max_Height);

            yield return(new WaitForSeconds(0.5f));

            for (int i = 0; i < 2; ++i)
            {
                TweenWidth.Begin(Dragon_EyeLeft, DragonEyeTwink, (int)(Dragon_Left_Eye_Src * 0.5f));
                yield return(new WaitForSeconds(DragonEyeTwink));

                TweenWidth.Begin(Dragon_EyeLeft, DragonEyeTwink, Dragon_Left_Eye_Src);
                yield return(new WaitForSeconds(DragonEyeTwink));
            }
        }
        else
        {
            TweenWidth.Begin(Dragon_EyeRight, DragonEyeTime, Dragon_Left_Eye_Tar * 3);
            TweenHeight.Begin(Dragon_EyeRight, DragonEyeTime, Dragon_Eye_Min_Height);
            yield return(new WaitForSeconds(DragonEyeTime));

            TweenWidth.Begin(Dragon_EyeRight, DragonEyeTime, Dragon_Left_Eye_Src);
            TweenHeight.Begin(Dragon_EyeRight, DragonEyeTime, Dragon_Eye_Max_Height);

            yield return(new WaitForSeconds(0.5f));

            for (int i = 0; i < 3; ++i)
            {
                TweenWidth.Begin(Dragon_EyeRight, DragonEyeTwink, (int)(Dragon_Left_Eye_Src * 0.5f));
                yield return(new WaitForSeconds(DragonEyeTwink));

                TweenWidth.Begin(Dragon_EyeRight, DragonEyeTwink, Dragon_Left_Eye_Src);
                yield return(new WaitForSeconds(DragonEyeTwink));
            }
        }
    }
コード例 #2
0
    IEnumerator playLight()
    {
        UISprite sprite = mLeftOrRigth ? LightLeft : LightRight;

        sprite.width  = Light_Width;
        sprite.height = Light_Height;

        sprite.gameObject.SetActive(true);

        TweenWidth.Begin(sprite, LightTime, Target_Width);
        yield return(new WaitForSeconds(LightTime));

        TweenHeight.Begin(sprite, LightTime, Target_Height);
        yield return(new WaitForSeconds(LightTime));

        sprite.gameObject.SetActive(false);

        StartCoroutine(DragonAppear());
    }
コード例 #3
0
        static int _m_Begin_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            try {
                {
                    UIWidget widget   = (UIWidget)translator.GetObject(L, 1, typeof(UIWidget));
                    float    duration = (float)LuaAPI.lua_tonumber(L, 2);
                    int      width    = LuaAPI.xlua_tointeger(L, 3);

                    TweenWidth __cl_gen_ret = TweenWidth.Begin(widget, duration, width);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
コード例 #4
0
    public static int Begin_s(IntPtr l)
    {
        int result;

        try
        {
            UIWidget widget;
            LuaObject.checkType <UIWidget>(l, 1, out widget);
            float duration;
            LuaObject.checkType(l, 2, out duration);
            int width;
            LuaObject.checkType(l, 3, out width);
            TweenWidth o = TweenWidth.Begin(widget, duration, width);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
コード例 #5
0
ファイル: TweenWidth.cs プロジェクト: Hengle/swc-decompiled
 public unsafe static long $Invoke0(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(TweenWidth.Begin((UIWidget)GCHandledObjects.GCHandleToObject(*args), *(float *)(args + 1), *(int *)(args + 2))));
 }