Ejemplo n.º 1
0
 void OnEnable()
 {
     _target = target as BCTweenRandTrigger;
     if (_target.randMaker == null)
     {
         _target.randMaker = _target.GetComponent <BCRandomMaker>();
     }
 }
 static int JudgeThenJumpToEnd(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         BCTweenRandTrigger obj = (BCTweenRandTrigger)ToLua.CheckObject <BCTweenRandTrigger>(L, 1);
         obj.JudgeThenJumpToEnd();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 3
0
    /// <summary>
    /// Manually activate the tweening process, reversing it if necessary.
    /// </summary>

    public virtual void Play(bool forward)
    {
        BCTweenRandTrigger randomTrigger = GetComponent <BCTweenRandTrigger>();

        if (randomTrigger != null && randomTrigger.enabled)
        {
            randomTrigger.JudgeTween();
        }

        mAmountPerDelta = Mathf.Abs(amountPerDelta);
        if (!forward)
        {
            mAmountPerDelta = -mAmountPerDelta;
        }
        enabled = true;
        Update();
    }
    static int get_from(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenRandTrigger  obj = (BCTweenRandTrigger)o;
            UnityEngine.Vector3 ret = obj.from;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index from on a nil value"));
        }
    }
    static int get_randMaker(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenRandTrigger obj = (BCTweenRandTrigger)o;
            BCRandomMaker      ret = obj.randMaker;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index randMaker on a nil value"));
        }
    }
    static int set_ruleTagDelay(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenRandTrigger obj  = (BCTweenRandTrigger)o;
            string             arg0 = ToLua.CheckString(L, 2);
            obj.ruleTagDelay = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index ruleTagDelay on a nil value"));
        }
    }
    static int set_delayRule(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenRandTrigger obj = (BCTweenRandTrigger)o;
            BCTweenRandTrigger.TweenTimeRule arg0 = (BCTweenRandTrigger.TweenTimeRule)ToLua.CheckObject(L, 2, typeof(BCTweenRandTrigger.TweenTimeRule));
            obj.delayRule = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index delayRule on a nil value"));
        }
    }
    static int set_delay(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenRandTrigger obj = (BCTweenRandTrigger)o;
            float arg0             = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.delay = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index delay on a nil value"));
        }
    }
    static int set_to_rule(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenRandTrigger obj = (BCTweenRandTrigger)o;
            BCTweenRandTrigger.TweenToRule[] arg0 = ToLua.CheckStructArray <BCTweenRandTrigger.TweenToRule>(L, 2);
            obj.to_rule = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index to_rule on a nil value"));
        }
    }
    static int set_to(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenRandTrigger  obj  = (BCTweenRandTrigger)o;
            UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2);
            obj.to = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index to on a nil value"));
        }
    }
    static int set_randMaker(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenRandTrigger obj  = (BCTweenRandTrigger)o;
            BCRandomMaker      arg0 = (BCRandomMaker)ToLua.CheckObject <BCRandomMaker>(L, 2);
            obj.randMaker = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index randMaker on a nil value"));
        }
    }
    static int get_ruleTagDelay(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenRandTrigger obj = (BCTweenRandTrigger)o;
            string             ret = obj.ruleTagDelay;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index ruleTagDelay on a nil value"));
        }
    }
    static int get_delayRule(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenRandTrigger obj = (BCTweenRandTrigger)o;
            BCTweenRandTrigger.TweenTimeRule ret = obj.delayRule;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index delayRule on a nil value"));
        }
    }
    static int get_delay(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCTweenRandTrigger obj = (BCTweenRandTrigger)o;
            float ret = obj.delay;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index delay on a nil value"));
        }
    }