コード例 #1
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SecondLife()
 {
     // These are order-dependant
     Network    = new NetworkManager(this);
     Settings   = new Settings(this);
     Parcels    = new ParcelManager(this);
     Self       = new AgentManager(this);
     Avatars    = new AvatarManager(this);
     Friends    = new FriendsManager(this);
     Grid       = new GridManager(this);
     Objects    = new ObjectManager(this);
     Groups     = new GroupManager(this);
     Assets     = new AssetManager(this);
     Appearance = new AppearanceManager(this, Assets);
     Inventory  = new InventoryManager(this);
     Directory  = new DirectoryManager(this);
     Terrain    = new TerrainManager(this);
     Sound      = new SoundManager(this);
     Throttle   = new AgentThrottle(this);
 }
コード例 #2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SecondLife()
 {
     // These are order-dependant
     Network = new NetworkManager(this);
     Settings = new Settings(this);
     Parcels = new ParcelManager(this);
     Self = new AgentManager(this);
     Avatars = new AvatarManager(this);
     Friends = new FriendsManager(this);
     Grid = new GridManager(this);
     Objects = new ObjectManager(this);
     Groups = new GroupManager(this);
     Assets = new AssetManager(this);
     Appearance = new AppearanceManager(this, Assets);
     Inventory = new InventoryManager(this);
     Directory = new DirectoryManager(this);
     Terrain = new TerrainManager(this);
     Sound = new SoundManager(this);
     Throttle = new AgentThrottle(this);
 }
コード例 #3
0
            /// <summary>
            /// Builds an AgentUpdate packet entirely from parameters. This
            /// will not touch the state of Self.Movement or
            /// Self.Movement.Camera in any way
            /// </summary>
            /// <param name="controlFlags"></param>
            /// <param name="position"></param>
            /// <param name="forwardAxis"></param>
            /// <param name="leftAxis"></param>
            /// <param name="upAxis"></param>
            /// <param name="bodyRotation"></param>
            /// <param name="headRotation"></param>
            /// <param name="farClip"></param>
            /// <param name="reliable"></param>
            /// <param name="flags"></param>
            /// <param name="state"></param>
            public void SendManualUpdate(AgentManager.ControlFlags controlFlags, LLVector3 position, LLVector3 forwardAxis,
                LLVector3 leftAxis, LLVector3 upAxis, LLQuaternion bodyRotation, LLQuaternion headRotation, float farClip,
                AgentFlags flags, AgentState state, bool reliable)
            {
                AgentUpdatePacket update = new AgentUpdatePacket();

                update.AgentData.AgentID = Client.Self.AgentID;
                update.AgentData.SessionID = Client.Self.SessionID;
                update.AgentData.BodyRotation = bodyRotation;
                update.AgentData.HeadRotation = headRotation;
                update.AgentData.CameraCenter = position;
                update.AgentData.CameraAtAxis = forwardAxis;
                update.AgentData.CameraLeftAxis = leftAxis;
                update.AgentData.CameraUpAxis = upAxis;
                update.AgentData.Far = farClip;
                update.AgentData.ControlFlags = (uint)controlFlags;
                update.AgentData.Flags = (byte)flags;
                update.AgentData.State = (byte)state;

                update.Header.Reliable = reliable;

                Client.Network.SendPacket(update);
            }
コード例 #4
0
ファイル: SLNetCom.cs プロジェクト: SObS/SLeek
        private void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags)
        {
            if (status == AgentManager.TeleportStatus.Finished || status == AgentManager.TeleportStatus.Failed)
                teleporting = false;

            TeleportStatusEventArgs ea = new TeleportStatusEventArgs(message, status, flags);

            if (netcomSync != null)
                netcomSync.BeginInvoke(new OnTeleportStatusRaise(OnTeleportStatusChanged), new object[] { ea });
            else
                OnTeleportStatusChanged(ea);
        }
コード例 #5
0
ファイル: AvatarTracker.cs プロジェクト: cfire24/ajaxlife
 void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags)
 {
     if (status == AgentManager.TeleportStatus.Finished)
     {
         this.avatars.Clear();
     }
 }
コード例 #6
0
ファイル: Events.cs プロジェクト: cfire24/ajaxlife
 public void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags)
 {
     Hashtable item = new Hashtable();
     item.Add("MessageType", "Teleport");
     item.Add("Status", status);
     item.Add("Flags", flags);
     if (status == AgentManager.TeleportStatus.Finished)
     {
         Client.Self.Movement.Camera.SetPositionOrientation(new LLVector3(128, 128, 0), 0, 0, 0);
     }
     enqueue(item);
 }
コード例 #7
0
ファイル: TeleportStatusEventArgs.cs プロジェクト: SObS/SLeek
 public TeleportStatusEventArgs(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags)
 {
     this.message = message;
     this.status = status;
     this.flags = flags;
 }
コード例 #8
0
ファイル: Client.cs プロジェクト: esetomo/nigomayobot
 void Self_OnTeleport(string message, AgentManager.TeleportStatus status, AgentManager.TeleportFlags flags)
 {
     switch (status)
     {
         case AgentManager.TeleportStatus.Finished:
             Appearance.SetPreviousAppearance(false);
             Self.Movement.AlwaysRun = true;
             break;
     }
 }
コード例 #9
0
 private void SetControlFlag(AgentManager.ControlFlags flag, bool value)
 {
     if (value) agentControls |= (uint)flag;
     else agentControls &= ~((uint)flag);
 }
コード例 #10
0
 private bool GetControlFlag(AgentManager.ControlFlags flag)
 {
     return (agentControls & (uint)flag) != 0;
 }