void Vp_OnObjectChange(Instance sender, ObjectChangeArgsT <Avatar, VpObject> args)
 {
     if (!args.Avatar.IsBot)
     {
         args.Serialize().AppendTextFile(LogName(args.GetType()));
     }
 }
Beispiel #2
0
 void sender_OnObjectCellRangeCreate(Instance sender, ObjectChangeArgsT <Avatar <Vector3>, VpObject <Vector3>, Vector3> args)
 {
     //if (args.VpObject.Model == "gamecube")
     //{
     //    printStats(sender.CacheObjects.Copy());
     //}
 }
Beispiel #3
0
 void sender_OnObjectCellRangeChange(Instance sender, ObjectChangeArgsT <Avatar <Vector3>, VpObject <Vector3>, Vector3> args)
 {
     //if (args.VpObject.Model == "gamecube")
     //{
     _cli.WriteLine(ConsoleMessageType.Event, args.VpObject.Serialize());
     //    printStats(sender.CacheObjects.Copy());
     //}
 }
Beispiel #4
0
 void instance_OnObjectChange(GameInstance sender, ObjectChangeArgsT <GameAvatar, GameVpObject, Vector3> args)
 {
     if (!_list.ContainsKey(args.VpObject.Id))
     {
         return;
     }
     _list[args.VpObject.Id].CopyFrom(args.VpObject, true);
     args.VpObject = _list[args.VpObject.Id];
     if (OnManagedObjectChanged != null)
     {
         OnManagedObjectChanged(_instance, args);
     }
 }
 void BaseInstanceT_CellCache_OnObjectChange(T sender, ObjectChangeArgsT <TAvatar, TVpObject> args)
 {
     lock (this)
     {
         if (!IsInCellCacheRange(args.VpObject))
         {
             // check if object was in cell range prior.
             var prev = _objects.Find(p => p.Id == args.VpObject.Id);
             _objects.Remove(prev);
             return;
         }
         var o = _objects.Find(p => p.Id == args.VpObject.Id);
         _objects.Remove(o);
         _objects.Add(args.VpObject);
         if (OnObjectCellRangeChange != null)
         {
             OnObjectCellRangeChange(Implementor, args);
         }
     }
 }
Beispiel #6
0
 /// <summary>
 /// Called when an object is changed.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 void vp_OnObjectChange(Instance sender, ObjectChangeArgsT <Avatar, VpObject> args)
 {
     // Write a serialized version showing all the data of object changed event using VpNet.Extension methods.
     Console.WriteLine("Object changed received.\r\n{0}", args.Serialize());
 }
Beispiel #7
0
 public void OnObjectChange(VpNet.Instance sender, ObjectChangeArgsT <Avatar <VpNet.Vector3>, VpObject <VpNet.Vector3>, VpNet.Vector3> args)
 {
     _caller.onObjectChange(args);
 }