• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# System.Objects类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Objects的典型用法代码示例。如果您正苦于以下问题:C# Objects类的具体用法?C# Objects怎么用?C# Objects使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Objects类属于System命名空间,在下文中一共展示了Objects类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Cavebot

        internal Cavebot(Objects.Client c)
        {
            this.Client = c;
            InitializeComponent();
            this.Icon = Properties.Resources.icon;
            this.timerStatusWatcher.Start();

            // set default UI values
            comboboxWaypointsOffset.SelectedIndex = 0;
            comboboxWaypointsType.SelectedIndex = 0;
            comboboxTargetingFightMode.SelectedIndex = 0;
            comboboxTargetingMinCount.SelectedIndex = 0;
            comboboxTargetingSpellRune.SelectedIndex = 0;
            comboboxTargetingStance.SelectedIndex = 0;
            comboboxLootingDestination.SelectedIndex = 1;

            // set default settings
            checkboxSettingsDebugMode.Checked = true;
            checkboxSettingsCanUseMagicRope.Checked = true;
            checkboxSettingsEatFood.Checked = true;
            checkboxSettingsStickToCreature.Checked = true;
            checkboxSettingsStopAttackingWhenOutOfRange.Checked = true;
            checkboxSettingsUseAlternateNodeFinder.Checked = true;

            // set up events
            this.Client.Modules.Cavebot.WaypointAdded += new Modules.Cavebot.WaypointHandler(Cavebot_WaypointAdded);
            this.Client.Modules.Cavebot.WaypointInserted += new Modules.Cavebot.WaypointInsertedHandler(Cavebot_WaypointInserted);
            this.Client.Modules.Cavebot.WaypointRemoved += new Modules.Cavebot.WaypointHandler(Cavebot_WaypointRemoved);
            this.Client.Modules.Cavebot.TargetAdded += new Modules.Cavebot.TargetHandler(Cavebot_TargetAdded);
            this.Client.Modules.Cavebot.TargetRemoved += new Modules.Cavebot.TargetHandler(Cavebot_TargetRemoved);
            this.Client.Modules.Cavebot.LootAdded += new Modules.Cavebot.LootHandler(Cavebot_LootAdded);
            this.Client.Modules.Cavebot.LootRemoved += new Modules.Cavebot.LootHandler(Cavebot_LootRemoved);
            this.Client.Modules.Cavebot.StatusChanged += new Modules.Cavebot.StatusChangedHandler(Cavebot_StatusChanged);
        }
开发者ID:KyLuaa,项目名称:bot,代码行数:34,代码来源:Cavebot.cs


示例2: MapGrid

 public MapGrid(int x, int y, bool walkable, Objects.Location location)
 {
     _x = x;
     _y = y;
     _walkable = walkable;
     _location = location;
 }
开发者ID:PimentelM,项目名称:extibiabot,代码行数:7,代码来源:MapGrid.cs


示例3: element_BeforeRendering

        void element_BeforeRendering(object sender, Objects.RenderEventArgs e)
        {
            vec3 currentVector = this.camera.Position - this.camera.Target;
            vec3 defaultVector = ScientificCamera.defaultPosition - ScientificCamera.defaultTarget;
            currentVector.Normalize();
            defaultVector.Normalize();

            float cosAngle = currentVector.ScalarProduct(defaultVector);// / 1.0f;
            float angle = (float)Math.Acos(cosAngle);
            //vec3 axis = currentVector.VectorProduct(defaultVector);
            vec3 axis = defaultVector.VectorProduct(currentVector);
            //mat4 translate = glm.translate(mat4.identity(), new vec3(0.2f, 0.2f, 0.2f));
            mat4 modelMatrix = glm.rotate(angle, axis);

            //mat4 modelMatrix = mat4.identity();
            mat4 viewMatrix = this.camera.GetViewMat4();
            mat4 projectionMatrix = this.camera.GetProjectionMat4();

            ShaderProgram shaderProgram = element.shaderProgram;
            shaderProgram.Bind();

            shaderProgram.SetUniformMatrix4(PyramidElement.strprojectionMatrix, projectionMatrix.to_array());
            shaderProgram.SetUniformMatrix4(PyramidElement.strviewMatrix, viewMatrix.to_array());
            shaderProgram.SetUniformMatrix4(PyramidElement.strmodelMatrix, modelMatrix.to_array());
        }
开发者ID:Mofangbao,项目名称:CSharpGL,代码行数:25,代码来源:FormAlwaysFaceCamera.cs


示例4: Update

		public override void Update(Objects.View3D view)
		{
			base.Update(view);

			SlimDX.Direct3D11.DeviceContext context = GameEnvironment.Device.ImmediateContext; 

			//DataStream stream = Instances.Map(MapMode.WriteDiscard, SlimDX.Direct3D11.MapFlags.None);

			DataBox box = context.MapSubresource(Instances, MapMode.WriteDiscard, MapFlags.None);
			DataStream stream = box.Data; 

			Random rand = new Random();

			float Dist = 300f;
			float HalfDist = Dist * 0.5f;

			for (int i = 0; i < MaxCount; i++)
			{
				stream.Write(new StarInstanceVertex()
				{
					Color = new Vector4((float)rand.NextDouble(), (float)rand.NextDouble(), (float)rand.NextDouble(), (float)rand.NextDouble()),
					Position = new Vector3((float)(rand.NextDouble() * Dist) - HalfDist,
											(float)(rand.NextDouble() * Dist) - HalfDist,
											(float)(rand.NextDouble() * Dist) - HalfDist)
				});

			}

			this.InstanceCount = MaxCount; 

			//Instances.Unmap(); 
			context.UnmapSubresource(Instances, 0); 
		}
开发者ID:RugCode,项目名称:drg-pt,代码行数:33,代码来源:TestParticles.cs


示例5: CastAoe

        internal static void CastAoe(string parSpellName, Objects.Location parSpellPos)
        {
            lock (Inject.inject_Lock)
            {
                DoString("CastSpellByName('" + parSpellName + "')");

                uint posStruc = BmWrapper.memory.AllocateMemory(12);

                if (posStruc != 0)
                {
                    bool b1 = BmWrapper.memory.WriteFloat(posStruc, parSpellPos.x);
                    bool b2 = BmWrapper.memory.WriteFloat(posStruc + 4, parSpellPos.y);
                    bool b3 = BmWrapper.memory.WriteFloat(posStruc + 8, parSpellPos.z);

                    if (b1 && b2 && b3)
                    {

                        // Write the asm stuff for Lua_DoString
                        String[] asm = new String[]
                        {
                            "mov eax, 0x40",
                            "mov [0xCECAC0], eax",

                            "mov eax, [" + Inject.PlayerPtr + "]",
                            "mov ecx, " + (uint)posStruc,
                            "call " + (uint)0x6E60F0,
                            "retn",
                        };
                        Inject.InjectAndExecute(asm, true);
                    }
                    BmWrapper.memory.FreeMemory(posStruc);
                }
            }
        }
开发者ID:acidburn974,项目名称:CorthezzWoWBot,代码行数:34,代码来源:Calls.cs


示例6: Get

		public static void Get(Objects.User user, Action<Objects.User> callback)
		{
			var parameters = new Dictionary<string, string>();
			if(user.Name != null && user.Name != string.Empty)
			{
				parameters.Add ("username", user.Name.ToLower());
			}
			else if (user.ID != 0)
			{
				parameters.Add ("user_id", user.ID.ToString());
			}

			Core.Request.Get(Constants.API_USERS_FETCH, parameters, (Core.Response response) => {
				if(response.success)
				{
					user.BulkUpdate(response.json["users"][0].AsObject);
				}
				else
				{
					user = null;
				}

				if (callback != null)
				{
					callback(user);
				}
			}, false);
		}
开发者ID:ttesla,项目名称:gj-unity-api,代码行数:28,代码来源:Users.cs


示例7: TurnPacket

        public TurnPacket(Objects.Client c, Constants.Direction direction)
            : base(c)
        {
            Direction = direction;

            switch (direction)
            {
                case Tibia.Constants.Direction.Down:
                    Type = OutgoingPacketType.TurnDown;
                    break;
                case Tibia.Constants.Direction.Up:
                    Type = OutgoingPacketType.TurnUp;
                    break;
                case Tibia.Constants.Direction.Right:
                    Type = OutgoingPacketType.TurnRight;
                    break;
                case Tibia.Constants.Direction.Left:
                    Type = OutgoingPacketType.TurnLeft;
                    break;
                default:
                    throw new ArgumentOutOfRangeException(
                        "direction",
                        "Valid directions for turning are Up, Right, Down, and Left.");
            }

            Destination = PacketDestination.Server;
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:27,代码来源:TurnPacket.cs


示例8: NetworkMessage

 public NetworkMessage(Objects.Client client, int size)
 {
     bufferSize = size;
     buffer = new byte[bufferSize];
     Client = client;
     position = GetPacketHeaderSize() + 2;
 }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:7,代码来源:NetworkMessage.cs


示例9: mainProcess

 public mainProcess(Objects.UserObject cUser,ref  List<Objects.MsgObject> list)
 {
     currentUser = cUser;
     mainProcess._globalMsgList = list;
     string userName = currentUser.FirstName + " " + currentUser.LastName;
     chatRobot = new msgCenter.Operators.ChatRobotOperator(userName);
 }
开发者ID:edwinv710,项目名称:TalkingHead,代码行数:7,代码来源:mainProcess.cs


示例10: legacyUIRect_BeforeRendering

        void legacyUIRect_BeforeRendering(object sender, Objects.RenderEventArgs e)
        {
            LegacySimpleUIRect element = sender as LegacySimpleUIRect;

            IUILayoutArgs args = element.GetArgs();

            GL.MatrixMode(GL.GL_PROJECTION);
            GL.PushMatrix();
            GL.LoadIdentity();
            GL.Ortho((float)args.left, (float)args.right, (float)args.bottom, (float)args.top, element.Param.zNear, element.Param.zFar);
            //GL.Ortho(args.left / 2, args.right / 2, args.bottom / 2, args.top / 2, element.Param.zNear, element.Param.zFar);

            IViewCamera camera = e.Camera;

            if (camera == null)
            {
                GL.gluLookAt(0, 0, 1, 0, 0, 0, 0, 1, 0);
                //throw new Exception("Camera not set!");
            }
            else
            {
                vec3 position = camera.Position - camera.Target;
                position.Normalize();
                GL.gluLookAt(position.x, position.y, position.z,
                    0, 0, 0,
                    camera.UpVector.x, camera.UpVector.y, camera.UpVector.z);
            }

            GL.MatrixMode(GL.GL_MODELVIEW);
            GL.PushMatrix();
            GL.Scale(args.UIWidth / 2, args.UIHeight / 2, args.UIWidth);

        }
开发者ID:Mofangbao,项目名称:CSharpGL,代码行数:33,代码来源:LegacySimpleUIRect.cs


示例11: Send

 public static bool Send(Objects.Client client, PipeConstantType constantType, uint value)
 {
     SetConstantPacket p = new SetConstantPacket(client);
     p.ConstantType = constantType;
     p.Value = value;
     return p.Send();
 }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:7,代码来源:SetConstantPacket.cs


示例12: Main

        static void Main(string[] args)
        {
            //Console
            int speed = 100;
            int playFieldWidth = 15;
            Console.BufferHeight = Console.WindowHeight = 30;
            Console.BufferWidth = Console.WindowWidth = 35;

            Objects userDwarf = new Objects();
            userDwarf.x = 2;
            userDwarf.y = Console.WindowHeight - 1;
            userDwarf.c = '@';
            userDwarf.color = ConsoleColor.White;

            List<Objects> objectss = new List<Objects>();
            Random randomGenerator = new Random();

            while (true)
            {
                if (speed >= 400)
                {
                    speed = 400;
                }
                Objects newEnemy = new Objects();
                newEnemy.color = ConsoleColor.Green;
                newEnemy.x = randomGenerator.Next(0, playFieldWidth); // 0-5
                newEnemy.y = 0; // poqvqva se nai-otgore
                newEnemy.c = '#';
                // newCar.c = randomGenerator.Next(randomKoli4ki[0],randomKoli4ki[duljina]);
                objectss.Add(newEnemy);
            }
        }
开发者ID:broxigarthered,项目名称:CSharpProjects,代码行数:32,代码来源:Program.cs


示例13: tryCaptureTower

        public static void tryCaptureTower(Objects.playerObject player)
        {
            List<Grid.GridObjectInterface> list = GameController.Grid.checkNeighbouringBlocks(player);

            foreach (Grid.GridObjectInterface item in list)
            {
                if (item is Objects.Turret && (item.Position - player.Position).Length() <= MAX_CAPTURE_DISTANCE)
                {
                    Objects.Turret turret = ((Objects.Turret)item);
                    if (turret.Team.Equals(Objects.Team.neutral))
                    {
                        turret.changeTeam(player.Team);
                        GameController.AIController.registerTurretOnTeam(turret, player.Team);
                        if (player.Team == Objects.Team.Red)
                        {
                            Controller.GameController.Team1Gold.Add(TradingInformation.creditsForCapturingTower.ToString());
                            Controller.GameController.team1.teamCredits += TradingInformation.creditsForCapturingTower;
                        }
                        else
                        {
                            Controller.GameController.Team2Gold.Add(TradingInformation.creditsForCapturingTower.ToString());
                            Controller.GameController.team2.teamCredits += TradingInformation.creditsForCapturingTower;
                        }
                        break;
                    }
                }
            }
        }
开发者ID:nthfloor,项目名称:Nebulon12,代码行数:28,代码来源:GridDataCollection.cs


示例14: ItemLocation

 /// <summary>
 /// Constructor for an item in the player's inventory.
 /// </summary>
 /// <param name="item"></param>
 public ItemLocation(Objects.Item item)
 {
     this.WorldLocation = item.ToLocation();
     this.ItemID = item.ID;
     this.ItemCount = item.Count;
     this.StackIndex = item.Slot;
 }
开发者ID:KyLuaa,项目名称:bot,代码行数:11,代码来源:ItemLocation.cs


示例15: Send

        public static bool Send(Objects.Client client, EventType eventType)
        {
            EventTriggerPacket p = new EventTriggerPacket(client);

            p.eventType = eventType;

            return p.Send();
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:8,代码来源:EventTriggerPacket.cs


示例16: Mapper

		void Mapper( Objects.ClassWithProperties instance )
		{
			var mapped = instance.MapInto<ClassWithProperties>();
			Assert.Equal( instance.PropertyOne, mapped.PropertyOne );
			Assert.Equal( instance.PropertyTwo, mapped.PropertyTwo );
			Assert.Equal( instance.PropertyThree, mapped.PropertyThree );
			Assert.Equal( instance.PropertyFour, mapped.PropertyFour );
		}
开发者ID:DevelopersWin,项目名称:VoteReporter,代码行数:8,代码来源:ObjectExtensionsTests.cs


示例17: Feed

 public void Feed(Objects.Data data)
 {
     // thread safe
     mutex.WaitOne();
     foreach (SubscriptionRegistration registration in registrations.Values)
         registration.Notify(data);
     mutex.ReleaseMutex();
 }
开发者ID:ziyan,项目名称:reactivity,代码行数:8,代码来源:SubscriptionManager.cs


示例18: Projectile

 public Projectile(Game game, Objects.Enemy target, int level)
     : base(game)
 {
     m_ModelName = "Projectiles/Sphere";
     Scale = 0.05f;
     m_Target = target;
     m_Level = level;
 }
开发者ID:jaseporter01,项目名称:defense,代码行数:8,代码来源:Projectile.cs


示例19: GetSpriteImage

 public static Image GetSpriteImage(Objects.Client client, int spriteId)
 {
     return GetSpriteImage(
         Path.Combine(
             Path.GetDirectoryName(client.Process.MainModule.FileName),
             "Pokemon.spr"),
         spriteId);
 }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:8,代码来源:SpriteReader.cs


示例20: SessionCheck

 public static bool SessionCheck(Objects.Gebruiker g)
 {
     if (!SQLInjectionCheck(g.GebruikersNaam) || !SQLInjectionCheck(g.WachtWoord) || g.GebruikersNaam == "" || g.WachtWoord == "" || g.GebruikersNaam.Length < 8 || g.WachtWoord.Length < 8)
     {
         return false;
     }
     return true;
 }
开发者ID:getitinthehub,项目名称:DORA_LIBRARY,代码行数:8,代码来源:AppSecurity.cs



注:本文中的System.Objects类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# System.OperatingSystem类代码示例发布时间:2022-05-26
下一篇:
C# System.Object类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap