当前位置: 首页>>代码示例>>C#>>正文


C# Map类代码示例

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


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

示例1: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				{
					m_House = reader.ReadItem() as BaseHouse;
					goto case 0;
				}
				case 0:
				{
					m_Description = reader.ReadString();
					m_Marked = reader.ReadBool();
					m_Target = reader.ReadPoint3D();
					m_TargetMap = reader.ReadMap();

					CalculateHue();

					break;
				}
			}
		}
开发者ID:nathanvy,项目名称:runuo,代码行数:26,代码来源:RecallRune.cs

示例2: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 3:
				case 2:
				{
					m_Level = reader.ReadInt();
					goto case 1;
				}
				case 1:
				{
					m_TargetMap = reader.ReadMap();
					break;
				}
				case 0:
				{
					m_TargetMap = Map.Felucca;
					break;
				}
			}

			if ( version < 2 )
				m_Level = GetRandomLevel();

//			if( version < 3 && m_TargetMap == Map.Tokuno )
//				m_TargetMap = Map.Felucca;
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:32,代码来源:MessageInABottle.cs

示例3: LocationStruct

 public LocationStruct(GenericReader reader)
 {
     int version = reader.ReadInt();
     Map = reader.ReadMap();
     Location = reader.ReadPoint3D();
     Name = reader.ReadString();
 }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:7,代码来源:SunnyToolbar.cs

示例4: GetMapHue

		public int GetMapHue( Map map )
		{
			if ( map == Map.Felucca )
				return 81;

			return 0;
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:7,代码来源:RunebookGump.cs

示例5: Effect

        public void Effect( Point3D loc, Map map, bool checkMulti )
        {
            if ( map == null || (!Core.AOS && Caster.Map != map) )
            {
                Caster.SendLocalizedMessage( 1005570 ); // You can not gate to another facet.
            }
            else if ( !map.CanFit( loc.X, loc.Y, loc.Z, 16 ) )
            {
                Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
            }
            else if ( (checkMulti && SpellHelper.CheckMulti( loc, map )) )
            {
                Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
            }
            else if ( !SpellHelper.CheckTravel( Caster, loc, map, TravelType.Gate ) && Caster.AccessLevel == AccessLevel.Player )
            {
                Caster.PlaySound( 0x5C );
            }
            else if ( CheckSequence() )
            {
                Caster.SendLocalizedMessage( 501024 ); // You open a magical gate to another location

                Effects.PlaySound( Caster.Location, Caster.Map, 0x20E );

                InternalItem firstGate = new InternalItem( loc, map );
                firstGate.MoveToWorld( Caster.Location, Caster.Map );

                Effects.PlaySound( loc, map, 0x20E );

                InternalItem secondGate = new InternalItem( Caster.Location, Caster.Map );
                secondGate.MoveToWorld( loc, map );
            }

            FinishSequence();
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:35,代码来源:GateTravel.cs

示例6: TopicWorker

        public TopicWorker(Factories.TopicFactory factory, Map map, Topic parentTopic, ITopicConnection connectionType)
        {
            _topic = factory.CreateTopic(map, parentTopic);
            _topicPointer = factory.CreateTopicPointer(connectionType);

            _topic.Pointer = _topicPointer;
        }
开发者ID:DmitryKrohmal,项目名称:Mind-mapping,代码行数:7,代码来源:TopicWorker.cs

示例7: turn

        private bool UsingSelectedAttack; //Determines if an attack from a ship is being used for the turn (requires option 1)

        #endregion Fields

        #region Constructors

        /// <summary>Initializes a member of the advanced turn class. Used to define maps used and how extra turns are awarded for the turn sequence.</summary>
        /// <param name="Bonus">Determines if a turn is awarded for destroying a part of the opponent's ship.</param>
        /// <param name="Salvo">Determines if a turn is awarded for each of the players ships above one.</param>
        /// <param name="FriendlyMap">The player's map.</param
        /// <param name="EnemyMap">The opponent's map</param> 
        public AdvancedTurn(bool Bonus, bool Salvo, Map FriendlyMap, Map EnemyMap)
            : base(Bonus, Salvo, FriendlyMap, EnemyMap)
        {
            SelectedOption = 0;
            SetSelectedIndex();
            UsingSelectedAA = false;
        }
开发者ID:WGDEVS,项目名称:SeaBattle,代码行数:18,代码来源:AdvancedTurn.cs

示例8: OnKillListener

 //This is the way we Listen for mob killing events.
 private bool OnKillListener(Map.World world, string group)
 {
     while (world.HasActorsInGroup(group))
     {
     }
     return true;
 }
开发者ID:Im2ortal,项目名称:mooege,代码行数:8,代码来源:151087.cs

示例9: MoleHideInfo

 public MoleHideInfo( Point3D loc, Map map, Mobile user )
 {
     m_Location = loc;
     m_Map = map;
     m_User = user;
     m_Count = 9;
 }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:7,代码来源:MoleHide.cs

示例10: GargantuanMinion

        public GargantuanMinion(Map.World world, PowerContext context, int GargID)
            : base(world, 122305, context.User, null)
        {
            Scale = 1f;
            //TODO: get a proper value for this.
            this.WalkSpeed *= 5;
            SetBrain(new MinionBrain(this));

            (Brain as MinionBrain).AddPresetPower(30005);
            (Brain as MinionBrain).AddPresetPower(30001);
            (Brain as MinionBrain).AddPresetPower(30592);
            (Brain as MinionBrain).AddPresetPower(30550);
            Attributes[GameAttribute.Hitpoints_Max] = 5f;
            Attributes[GameAttribute.Hitpoints_Cur] = 5f;
            Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;


            Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
            Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 7f;
            
            Attributes[GameAttribute.Pet_Type] = 0x8;
            //Pet_Owner and Pet_Creator seems to be 0
            (context.User as Player).InGameClient.SendMessage(new PetMessage()
            {
                Field0 = 0,
                Field1 = GargID,
                PetId = this.DynamicID,
                Field3 = 0x8,
            });
        }
开发者ID:n4v,项目名称:mooege,代码行数:30,代码来源:GargantuanMinion.cs

示例11: Start

    void Start()
    {
        // create the map singleton
        map = Map.Instance;

        // 9 rue Gentil, Lyon
        map.CenterWGS84 = new double[2] { 4.83527, 45.76487 };
        map.UseLocation = true;
        map.InputsEnabled = true;

        // create a test layer
        TileLayer layer = map.CreateLayer<OSMTileLayer>("test tile layer");
        layer.URLFormat = "http://a.tile.openstreetmap.org/{0}/{1}/{2}.png";

        // create some test 2D markers
        GameObject go = Tile.CreateTileTemplate();
        go.renderer.material.mainTexture = MarkerTexture;
        go.renderer.material.renderQueue = 4000;

        GameObject markerGO;
        markerGO = Instantiate(go) as GameObject;
        map.CreateMarker<Marker>("test marker - 9 rue Gentil, Lyon", new double[2] { 4.83527, 45.76487 }, markerGO);

        markerGO = Instantiate(go) as GameObject;
        map.CreateMarker<Marker>("test marker - 31 rue de la Bourse, Lyon", new double[2] { 4.83699, 45.76535 }, markerGO);

        markerGO = Instantiate(go) as GameObject;
        map.CreateMarker<Marker>("test marker - 1 place St Nizier, Lyon", new double[2] { 4.83295, 45.76468 }, markerGO);

        DestroyImmediate(go);
    }
开发者ID:liszto,项目名称:UnitySlippyMap,代码行数:31,代码来源:TestMap.cs

示例12: Form1

 public Form1()
 {
     _map = new MapAround.Mapping.Map();
     InitializeComponent();
     mapControl.Map = _map;
    
 }
开发者ID:gkrsu,项目名称:maparound.example,代码行数:7,代码来源:Form1.cs

示例13: ProcessYaml

        static void ProcessYaml(ModData modData, Map map, MiniYaml yaml, int engineDate, UpgradeAction processYaml)
        {
            if (yaml == null)
                return;

            if (yaml.Value != null)
            {
                var files = FieldLoader.GetValue<string[]>("value", yaml.Value);
                foreach (var filename in files)
                {
                    var fileNodes = MiniYaml.FromStream(map.Open(filename), filename);
                    processYaml(modData, engineDate, ref fileNodes, null, 0);

                    // HACK: Obtain the writable save path using knowledge of the underlying filesystem workings
                    var packagePath = filename;
                    var package = map.Package;
                    if (filename.Contains("|"))
                        modData.DefaultFileSystem.TryGetPackageContaining(filename, out package, out packagePath);

                    ((IReadWritePackage)package).Update(packagePath, Encoding.ASCII.GetBytes(fileNodes.WriteToString()));
                }
            }

            processYaml(modData, engineDate, ref yaml.Nodes, null, 1);
        }
开发者ID:pchote,项目名称:OpenRA,代码行数:25,代码来源:UpgradeMapCommand.cs

示例14: BreakableBlock

 public BreakableBlock(int x, int y, Sprite sprite, Map map)
     : base(x,y, sprite)
 {
     //this.Kill(); // Do not draw me
     this.collisionBlock = new CollisionBlock(x, y, sprite.Width, sprite.Height);
     map.ExtraCollisionBlocks.Add(collisionBlock);
 }
开发者ID:crast,项目名称:GameJam,代码行数:7,代码来源:BreakableBlock.cs

示例15: FixMap

		public static void FixMap(this PlayerMobile m, Map def, Point3D loc)
		{
			if (m == null || m.Deleted || def == null || def == Map.Internal || loc == Point3D.Zero)
			{
				return;
			}

			if (m.LogoutMap == null || m.LogoutMap == Map.Internal)
			{
				m.LogoutLocation = loc.ToPoint3D();
				m.LogoutMap = def;
			}

			if (m.Map != null)
			{
				return;
			}

			if (IsOnline(m))
			{
				m.MoveToWorld(loc, def);
				BaseCreature.TeleportPets(m, loc, def);
			}
			else
			{
				m.Location = loc;
				m.Internalize();
				m.AutoStablePets();
			}
		}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:30,代码来源:PlayerMobileExt.cs


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