Esempio n. 1
0
        public LuaArgs playCameraAnimation(LuaArgs args)
        {
            var path = args.GetString(0);

            if (LuaAnimation.Exists(path))
            {
                var anim = LuaAnimation.Get(path);
                m_state.StartCameraAnimation(anim);
                return(LuaArgs.Empty);
            }
            else
            {
                throw new LuaError(string.Format("No such animation: {0}", path));
            }
        }
Esempio n. 2
0
            public LuaArgs playAnimation(LuaArgs args)
            {
                var path        = args.GetString(0);
                var animateRoot = args.IsNil(1) ? true : args.GetBool(1);

                if (LuaAnimation.Exists(path))
                {
                    var anim = LuaAnimation.Get(path);
                    m_entity.StartAnimation(anim, animateRoot);
                    return(LuaArgs.Empty);
                }
                else
                {
                    throw new LuaError(string.Format("No such animation: {0}", path));
                }
            }