Example #1
0
    static int AddBoneMask(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                DragonBones.AnimationState obj = (DragonBones.AnimationState)ToLua.CheckObject <DragonBones.AnimationState>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                obj.AddBoneMask(arg0);
                return(0);
            }
            else if (count == 3)
            {
                DragonBones.AnimationState obj = (DragonBones.AnimationState)ToLua.CheckObject <DragonBones.AnimationState>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                bool   arg1 = LuaDLL.luaL_checkboolean(L, 3);
                obj.AddBoneMask(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: DragonBones.AnimationState.AddBoneMask"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Example #2
0
 static int AddBoneMask(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         DragonBones.AnimationState obj = (DragonBones.AnimationState)ToLua.CheckObject(L, 1, typeof(DragonBones.AnimationState));
         string arg0 = ToLua.CheckString(L, 2);
         bool   arg1 = LuaDLL.luaL_checkboolean(L, 3);
         obj.AddBoneMask(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #3
0
        private void _updateAttack()
        {
            if (!_isAttackingA || _isAttackingB)
            {
                return;
            }

            _isAttackingB = true;

            // Animation mixing.
            _attackState = _armatureComponent.animation.FadeIn(
                "attack_01", -1.0f, -1,
                0, ATTACK_ANIMATION_GROUP, AnimationFadeOutMode.SameGroup
                );

            _attackState.autoFadeOutTime = _attackState.fadeTotalTime;
            _attackState.AddBoneMask("pelvis");
        }