public void SetTarget(int n, ReferenceTarget rt)
 {
     if (rt == null)
         _Maker.ReplaceReference(n, null, true);
     else
         _Maker.ReplaceReference(n, rt._Target, true);
 }
Пример #2
0
            public Plugin(Animatable a)
                : base(a)
            {
                className = a.ClassName;
                cid       = a.ClassID;
                scid      = a.SuperClassID;
                ReferenceTarget rt  = a as ReferenceTarget;
                var             pbs = new List <ParameterBlock>();

                if (rt == null)
                {
                    targets = new Reference[0];
                }
                else
                {
                    targets = new Reference[rt.NumTargets];
                    for (int i = 0; i < rt.NumTargets; ++i)
                    {
                        var target = rt.GetTarget(i);
                        targets[i] = new Reference(target);

                        if (target is ParameterBlock1)
                        {
                            pbs.Add(new ParameterBlock(target as ParameterBlock1));
                        }
                        else if (target is ParameterBlock2)
                        {
                            pbs.Add(new ParameterBlock(target as ParameterBlock2));
                        }
                    }
                }
                paramblocks = pbs.ToArray();
            }
Пример #3
0
 public ReferenceListener(ReferenceTarget target, RefMessage message, Action action)
 {
     this.target  = target;
     this.message = message;
     this.action  = action;
     Kernel.listeners.Add(this);
     ReplaceReference(0, target._Target, true);
 }
Пример #4
0
 public ReferenceListener(ReferenceTarget target, RefMessage message, Action action)
 {
     this.target = target;
     this.message = message;
     this.action = action;
     Kernel.listeners.Add(this);
     ReplaceReference(0, target._Target, true);
 }
Пример #5
0
 public override void SetReference(int i, IReferenceTarget rtarg)
 {
     if (i != 0) 
         return;
     if (rtarg == null)
         target = null;
     else
         target = Animatable.CreateWrapper<ReferenceTarget>(rtarg);
 }
Пример #6
0
 public Reference(ReferenceTarget rt)
 {
     if (rt == null || !rt.Valid)
     {
         id = 0;
     }
     else
     {
         this.id = (ulong)rt.AnimHandle;
     }
 }
Пример #7
0
 public void SetTarget(int n, ReferenceTarget rt)
 {
     if (rt == null)
     {
         _Maker.ReplaceReference(n, null, true);
     }
     else
     {
         _Maker.ReplaceReference(n, rt._Target, true);
     }
 }
Пример #8
0
 public Reference(ReferenceTarget rt)
 {
     if (rt == null || !rt.Valid)
     {
         id = 0;
     }
     else
     {
         this.id = (ulong)rt.AnimHandle;
     }
 }
Пример #9
0
 public override void SetReference(int i, IReferenceTarget rtarg)
 {
     if (i != 0)
     {
         return;
     }
     if (rtarg == null)
     {
         target = null;
     }
     else
     {
         target = Animatable.CreateWrapper <ReferenceTarget>(rtarg);
     }
 }
Пример #10
0
 internal Scene(IInterface13 x)
 {
     scene          = x.Scene;
     sceneRootNode  = Animatable.CreateWrapper <Node>(x.RootNode);
     sceneRefTarget = Animatable.CreateWrapper <ReferenceTarget>(x.ScenePointer);
 }