Наследование: IDisposable
Пример #1
0
    static int Play(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 2)
        {
            UnityEngine.Experimental.Director.DirectorPlayer obj  = (UnityEngine.Experimental.Director.DirectorPlayer)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.Experimental.Director.DirectorPlayer");
            UnityEngine.Experimental.Director.Playable       arg0 = (UnityEngine.Experimental.Director.Playable)LuaScriptMgr.GetNetObject(L, 2, typeof(UnityEngine.Experimental.Director.Playable));
            obj.Play(arg0);
            return(0);
        }
        else if (count == 3)
        {
            UnityEngine.Experimental.Director.DirectorPlayer obj  = (UnityEngine.Experimental.Director.DirectorPlayer)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.Experimental.Director.DirectorPlayer");
            UnityEngine.Experimental.Director.Playable       arg0 = (UnityEngine.Experimental.Director.Playable)LuaScriptMgr.GetNetObject(L, 2, typeof(UnityEngine.Experimental.Director.Playable));
            object arg1 = LuaScriptMgr.GetVarObject(L, 3);
            obj.Play(arg0, arg1);
            return(0);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: UnityEngine.Experimental.Director.DirectorPlayer.Play");
        }

        return(0);
    }
    static int Play(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, typeof(UnityEngine.Experimental.Director.DirectorPlayer), typeof(UnityEngine.Experimental.Director.Playable)))
            {
                UnityEngine.Experimental.Director.DirectorPlayer obj  = (UnityEngine.Experimental.Director.DirectorPlayer)ToLua.ToObject(L, 1);
                UnityEngine.Experimental.Director.Playable       arg0 = (UnityEngine.Experimental.Director.Playable)ToLua.ToObject(L, 2);
                obj.Play(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, typeof(UnityEngine.Experimental.Director.DirectorPlayer), typeof(UnityEngine.Experimental.Director.Playable), typeof(object)))
            {
                UnityEngine.Experimental.Director.DirectorPlayer obj  = (UnityEngine.Experimental.Director.DirectorPlayer)ToLua.ToObject(L, 1);
                UnityEngine.Experimental.Director.Playable       arg0 = (UnityEngine.Experimental.Director.Playable)ToLua.ToObject(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                obj.Play(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Experimental.Director.DirectorPlayer.Play"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static public int GetInputs(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.Experimental.Director.Playable self = (UnityEngine.Experimental.Director.Playable)checkSelf(l);
             var ret = self.GetInputs();
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 2)
         {
             UnityEngine.Experimental.Director.Playable self = (UnityEngine.Experimental.Director.Playable)checkSelf(l);
             System.Collections.Generic.List <UnityEngine.Experimental.Director.Playable> a1;
             checkType(l, 2, out a1);
             self.GetInputs(a1);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #4
0
    public void UpdateLayout(Playable graph)
    {
        if (m_Layout == null)
            m_Layout = new ReingoldTilford();

        m_Layout.Layout(graph);
        Repaint();
    }
Пример #5
0
 internal static bool CheckPlayableValidity(Playable playable, string name)
 {
     if (playable == null)
     {
         throw new NullReferenceException("Playable " + name + "is null");
     }
     return true;
 }
Пример #6
0
 public void OnPlayModeChanged()
 {
     if (!EditorApplication.isPaused && !EditorApplication.isPlaying)
     {
         m_CurrentGraph = null;
         m_Graphs.Clear();
         Repaint();
     }
 }
    void Start()
    {
        root = new AnimationClipPlayable( clip );

        // Bind the playable to the player
        GetComponent<Animator>().Play( root );

        root.state = PlayState.Paused;
    }
    public static void OnGUI(Rect position, Playable p)
    {
        const string msg = "custom\nfor clips";
        var nodeStyle = new GUIStyle("flow node 6");

        Vector2 sizeNeeded = nodeStyle.CalcSize(new GUIContent(msg));
        if (sizeNeeded.x < position.width && sizeNeeded.y < position.height)
            GUI.Label(position, msg, nodeStyle);
        else
            GUI.Label(position, "", nodeStyle);
    }
Пример #9
0
    static bool DirectorPlayer_Play__Playable(JSVCall vc, int argc)
    {
        int len = argc;

        if (len == 1)
        {
            UnityEngine.Experimental.Director.Playable arg0 = (UnityEngine.Experimental.Director.Playable)JSMgr.datax.getObject((int)JSApi.GetType.Arg);
            ((UnityEngine.Experimental.Director.DirectorPlayer)vc.csObj).Play(arg0);
        }

        return(true);
    }
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.Experimental.Director.Playable o;
			o=new UnityEngine.Experimental.Director.Playable();
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
 static public int get_outputCount(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.Playable self = (UnityEngine.Experimental.Director.Playable)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.outputCount);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int ClearInputs(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.Playable self = (UnityEngine.Experimental.Director.Playable)checkSelf(l);
         self.ClearInputs();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #13
0
    static bool DirectorPlayer_Play__Playable__Object(JSVCall vc, int argc)
    {
        int len = argc;

        if (len == 2)
        {
            UnityEngine.Experimental.Director.Playable arg0 = (UnityEngine.Experimental.Director.Playable)JSMgr.datax.getObject((int)JSApi.GetType.Arg);
            System.Object arg1 = (System.Object)JSMgr.datax.getWhatever((int)JSApi.GetType.Arg);
            ((UnityEngine.Experimental.Director.DirectorPlayer)vc.csObj).Play(arg0, arg1);
        }

        return(true);
    }
 static public int IsValid(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.Playable self = (UnityEngine.Experimental.Director.Playable)checkSelf(l);
         var ret = self.IsValid();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #15
0
        // Main entry point of the algorithm
        public void Layout(Playable root)
        {
            m_Root = root;
            if (m_Nodes.Any())
            {
                Clear();
            }
            RecursiveAddNodes(root, 0, 1.0f, 1.0f);

            ComputeHorizontalPositionForEachLevel();
            RecursiveTraverse(root);
            UpdateVerticesAndEdgesForRendering();
        }
Пример #16
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.Playable o;
         o = new UnityEngine.Experimental.Director.Playable();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int OnSetTime(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.Playable self = (UnityEngine.Experimental.Director.Playable)checkSelf(l);
         System.Single a1;
         checkType(l, 2, out a1);
         self.OnSetTime(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int PrepareFrame(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.Playable  self = (UnityEngine.Experimental.Director.Playable)checkSelf(l);
         UnityEngine.Experimental.Director.FrameData a1;
         checkValueType(l, 2, out a1);
         self.PrepareFrame(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_state(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.Playable  self = (UnityEngine.Experimental.Director.Playable)checkSelf(l);
         UnityEngine.Experimental.Director.PlayState v;
         checkEnum(l, 2, out v);
         self.state = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int IsValid(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.Experimental.Director.Playable obj = (UnityEngine.Experimental.Director.Playable)ToLua.CheckObject(L, 1, typeof(UnityEngine.Experimental.Director.Playable));
         bool o = obj.IsValid();
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static public int GetOutput(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.Playable self = (UnityEngine.Experimental.Director.Playable)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         var ret = self.GetOutput(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int Play(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.Experimental.Director.DirectorPlayer obj  = (UnityEngine.Experimental.Director.DirectorPlayer)ToLua.CheckObject(L, 1, typeof(UnityEngine.Experimental.Director.DirectorPlayer));
         UnityEngine.Experimental.Director.Playable       arg0 = (UnityEngine.Experimental.Director.Playable)ToLua.CheckObject(L, 2, typeof(UnityEngine.Experimental.Director.Playable));
         obj.Play(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 internal static bool SetInputs(AnimationMixerPlayable playable, AnimationClip[] clips)
 {
     if (clips == null)
     {
         throw new NullReferenceException("Parameter clips was null. You need to pass in a valid array of clips.");
     }
     Playables.BeginIgnoreAllocationTracker();
     Playable[] sources = new Playable[clips.Length];
     for (int i = 0; i < clips.Length; i++)
     {
         sources[i] = (Playable) AnimationClipPlayable.Create(clips[i]);
         Playable target = sources[i];
         Playables.SetPlayableDeleteOnDisconnect(ref target, true);
     }
     Playables.EndIgnoreAllocationTracker();
     return SetInputsValidated((AnimationPlayable) playable, sources, typeof(AnimationMixerPlayable));
 }
    static int get_handle(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Experimental.Director.Playable       obj = (UnityEngine.Experimental.Director.Playable)o;
            UnityEngine.Experimental.Director.PlayableHandle ret = obj.handle;
            ToLua.PushValue(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index handle on a nil value" : e.Message));
        }
    }
    static int set_handle(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Experimental.Director.Playable       obj  = (UnityEngine.Experimental.Director.Playable)o;
            UnityEngine.Experimental.Director.PlayableHandle arg0 = (UnityEngine.Experimental.Director.PlayableHandle)ToLua.CheckObject(L, 2, typeof(UnityEngine.Experimental.Director.PlayableHandle));
            obj.handle = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index handle on a nil value" : e.Message));
        }
    }
Пример #26
0
    public void OnUpdateGraph(Playable p, string title)
    {
        if (!m_Graphs.ContainsKey(p))
        {
            m_Graphs.Add(p, title);
            m_CurrentGraph = p;
        }
        // Update titles if necessary
        else if (m_Graphs.ContainsKey(p) && m_Graphs[p] != title)
        {
            m_Graphs[p] = title;
        }

        if (m_CurrentGraph == p)
        {
            UpdateLayout(p);
        }
    }
Пример #27
0
 internal static bool CompareIntPtr(Playable lhs, Playable rhs)
 {
     bool flag = (lhs == null) || !IsNativePlayableAlive(lhs);
     bool flag2 = (rhs == null) || !IsNativePlayableAlive(rhs);
     if (flag2 && flag)
     {
         return true;
     }
     if (flag2)
     {
         return !IsNativePlayableAlive(lhs);
     }
     if (flag)
     {
         return !IsNativePlayableAlive(rhs);
     }
     return (lhs.GetUniqueIDInternal() == rhs.GetUniqueIDInternal());
 }
    static int _CreateUnityEngine_Experimental_Director_Playable(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                UnityEngine.Experimental.Director.Playable obj = new UnityEngine.Experimental.Director.Playable();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.Experimental.Director.Playable.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Пример #29
0
 private void PlayInternal(Playable playable, object customData);
Пример #30
0
 private static extern void INTERNAL_CALL_SetPlayableDeleteOnDisconnect(ref Playable target, bool value);
Пример #31
0
 internal static bool IsValid(Playable playable)
 {
     return playable.IsValid();
 }
Пример #32
0
 internal static double GetTimeValidated(Playable playable, Type typeofPlayable)
 {
     return playable.time;
 }
Пример #33
0
 private static extern void INTERNAL_CALL_DisconnectInternal(ref Playable target, int inputPort);
Пример #34
0
 internal static float GetInputWeightValidated(Playable playable, int index, Type typeofPlayable)
 {
     return playable.GetInputWeight(index);
 }
Пример #35
0
 internal static Playable GetOutputValidated(Playable playable, int outputPort, Type typeofPlayable)
 {
     return playable.GetOutput(outputPort);
 }
Пример #36
0
 public override bool Equals(object p)
 {
     return(Playable.CompareIntPtr(this, p as Playable));
 }
Пример #37
0
 internal static bool IsNativePlayableAlive(Playable p)
 {
     return(p.m_Ptr != IntPtr.Zero);
 }
Пример #38
0
 private void PlayInternal(Playable playable, object customData)
 {
     throw new NotImplementedException("なにこれ");
 }
Пример #39
0
 public void Play(Playable playable)
 {
     PlayInternal(playable, null);
 }
Пример #40
0
 public void Play(Playable playable, object customData)
 {
     this.PlayInternal(playable, customData);
 }
Пример #41
0
 internal static extern void DisconnectInternal(Playable target, int inputPort);
Пример #42
0
 internal static extern bool ConnectInternal(Playable source, Playable target, int sourceOutputPort, int targetInputPort);
Пример #43
0
 internal static double GetDurationValidated(Playable playable, Type typeofPlayable)
 {
     return playable.duration;
 }
Пример #44
0
 public static bool operator !=(Playable x, Playable y)
 {
     return(!Playable.CompareIntPtr(x, y));
 }
Пример #45
0
 internal static Playable GetInputValidated(Playable playable, int inputPort, Type typeofPlayable)
 {
     return playable.GetInput(inputPort);
 }
Пример #46
0
 public static bool Connect(Playable source, Playable target)
 {
     return(Playable.Connect(source, target, -1, -1));
 }
Пример #47
0
 internal static int GetOutputCountValidated(Playable playable, Type typeofPlayable)
 {
     return playable.outputCount;
 }
Пример #48
0
 internal static bool CompareVersion(Playable lhs, Playable rhs)
 {
     return Playable.CompareVersion(lhs, rhs);
 }
Пример #49
0
 internal static PlayState GetPlayStateValidated(Playable playable, Type typeofPlayable)
 {
     return playable.state;
 }
Пример #50
0
 internal static bool ConnectInternal(ref Playable source, ref Playable target, int sourceOutputPort, int targetInputPort)
 {
     return INTERNAL_CALL_ConnectInternal(ref source, ref target, sourceOutputPort, targetInputPort);
 }
Пример #51
0
 private static extern bool INTERNAL_CALL_ConnectInternal(ref Playable source, ref Playable target, int sourceOutputPort, int targetInputPort);
Пример #52
0
 internal static void DisconnectInternal(ref Playable target, int inputPort)
 {
     INTERNAL_CALL_DisconnectInternal(ref target, inputPort);
 }
Пример #53
0
 private static extern void INTERNAL_CALL_InternalDestroy(ref Playable playable);
Пример #54
0
 internal static bool Equals(Playable isAPlayable, object mightBeAnythingOrNull)
 {
     return ((mightBeAnythingOrNull != null) && isAPlayable.Equals(mightBeAnythingOrNull));
 }
Пример #55
0
 internal static void InternalDestroy(ref Playable playable)
 {
     INTERNAL_CALL_InternalDestroy(ref playable);
 }
Пример #56
0
 internal static bool Equals(Playable lhs, Playable rhs)
 {
     return CompareVersion(lhs, rhs);
 }
Пример #57
0
 internal static void SetPlayStateValidated(Playable playable, PlayState playState, Type typeofPlayable)
 {
     playable.state = playState;
 }
Пример #58
0
 /// <summary>
 ///   <para>Starts playing a Experimental.Director.Playable tree.</para>
 /// </summary>
 /// <param name="playable">The root Experimental.Director.Playable in the tree.</param>
 public void Play(Playable playable)
 {
     this.PlayInternal(playable, (object)null);
 }
Пример #59
0
 internal static void SetTimeValidated(Playable playable, double time, Type typeofPlayable)
 {
     playable.time = time;
 }
Пример #60
0
 public virtual int AddInput(AnimationPlayable source)
 {
     Playable.Connect(source, this, -1, -1);
     Playable[] inputs = base.GetInputs();
     return(inputs.Length - 1);
 }