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


C# MirObjects.MapObject类代码示例

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


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

示例1: AddObject

        public void AddObject(MapObject ob)
        {
            if (CellObjects == null) CellObjects = new List<MapObject>();

            CellObjects.Insert(0, ob);
            Sort();
        }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:7,代码来源:MapCode.cs

示例2: RemoveObject

        public void RemoveObject(MapObject ob)
        {
            CellObjects.Remove(ob);

            if (CellObjects.Count == 0) CellObjects = null;
            else Sort();
        }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:7,代码来源:MapCode.cs

示例3: BuffEffect

 public BuffEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, BuffType buffType)
     : base(library, baseIndex, count, duration, owner, 0)
 {
     Repeat = true;
     Blend = blend;
     BuffType = buffType;
     Light = -1;
 }
开发者ID:rise-worlds,项目名称:mir2,代码行数:8,代码来源:Effect.cs

示例4: Effect

        public Effect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, long starttime = 0)
        {
            Library = library;
            BaseIndex = baseIndex;
            Count = count == 0 ? 1 : count;
            Duration = duration;
            Start = starttime == 0 ? CMain.Time : starttime;

            NextFrame = Start + (Duration / Count) * (CurrentFrame + 1);
            Owner = owner;
            Source = Owner.CurrentLocation;
        }
开发者ID:WillMcKill,项目名称:MirRage,代码行数:12,代码来源:Effect.cs

示例5: DelayedExplosionEffect

 public DelayedExplosionEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, int Stage, long until)
     : base(library, baseIndex, count, duration, owner)
 {
     Repeat = (Stage == 2) ? false : true;
     Blend = blend;
     stage = Stage;
     effectlist.Add(this);
     if (stage == 1)
         SoundManager.PlaySound(20000 + 125 * 10);
     if (stage == 2)
         SoundManager.PlaySound(20000 + 125 * 10 + 5);
 }
开发者ID:rise-worlds,项目名称:mir2,代码行数:12,代码来源:Effect.cs

示例6: SortObject

 public void SortObject(MapObject ob)
 {
     M2CellInfo[ob.MapLocation.X, ob.MapLocation.Y].Sort();
 }
开发者ID:ElijahLOMCN,项目名称:mir2,代码行数:4,代码来源:GameScene.cs

示例7: AddObject

 public void AddObject(MapObject ob)
 {
     M2CellInfo[ob.MapLocation.X, ob.MapLocation.Y].AddObject(ob);
 }
开发者ID:ElijahLOMCN,项目名称:mir2,代码行数:4,代码来源:GameScene.cs

示例8: RemoveObject

 public void RemoveObject(MapObject ob)
 {
     M2CellInfo[ob.MapLocation.X, ob.MapLocation.Y].RemoveObject(ob);
 }
开发者ID:ElijahLOMCN,项目名称:mir2,代码行数:4,代码来源:GameScene.cs

示例9: SpecialEffect

 public SpecialEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, bool drawBehind, uint type)
     : base(library, baseIndex, count, duration, owner, 0, drawBehind)
 {
     Blend = blend;
     DrawBehind = drawBehind;
     EffectType = type;
     Light = -1;
 }
开发者ID:ufaith,项目名称:cmir2,代码行数:8,代码来源:Effect.cs

示例10: ElementsEffect

        bool loopit = false;//soundloop

        public ElementsEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, int elementType, int killtime, bool loopon = false)
            : base(library, baseIndex, count, duration, owner)
        {
            Repeat = true;
            Blend = blend;
            myType = elementType;
            killAt = killtime;
            //
            loopit = loopon;
            StopSounds();
            StartSound();
        }
开发者ID:ufaith,项目名称:cmir2,代码行数:14,代码来源:Effect.cs

示例11: InterruptionEffect

 public InterruptionEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, long starttime = 0)
     : base(library, baseIndex, count, duration, owner)
 {
     Repeat = true;
     Blend = blend;
     effectlist.Add(this);
 }
开发者ID:ufaith,项目名称:cmir2,代码行数:7,代码来源:Effect.cs

示例12: Missile

 public Missile(MLibrary library, int baseIndex, int count, int duration, MapObject owner, Point target, bool direction16 = true)
     : base(library, baseIndex, count, duration, owner)
 {
     Missiles.Add(this);
     Source = Owner.CurrentLocation;
     Destination = target;
     Direction = direction16 ? MapControl.Direction16(Source, Destination) : (int)Functions.DirectionFromPoint(Source, Destination);
 }
开发者ID:ufaith,项目名称:cmir2,代码行数:8,代码来源:Effect.cs

示例13: LightEffect

 public LightEffect(int duration, MapObject owner, long starttime = 0, int lightDistance = 6, Color? lightColour = null)
     : base(null, 0, 0, duration, owner, starttime)
 {
     Light = lightDistance;
     //LightColour = lightColour == null ? Color.White : (Color)lightColour;
 }
开发者ID:thedeaths,项目名称:mir2,代码行数:6,代码来源:Effect.cs

示例14: ClearMagic

 public void ClearMagic()
 {
     NextMagic = null;
     NextMagicDirection = 0;
     NextMagicLocation = Point.Empty;
     NextMagicObject = null;
 }
开发者ID:ufaith,项目名称:cmir2,代码行数:7,代码来源:UserObject.cs

示例15: Remove

        public void Remove()
        {
            if (MouseObject == this) MouseObject = null;
            if (TargetObject == this) TargetObject = null;
            if (MagicObject == this) MagicObject = null;

            if (this == User.NextMagicObject)
                User.ClearMagic();

            MapControl.Objects.Remove(this);
            GameScene.Scene.MapControl.RemoveObject(this);

            if (ObjectID != GameScene.NPCID) return;

            GameScene.NPCID = 0;
            GameScene.Scene.NPCDialog.Hide();
        }
开发者ID:xiaofengzhiyu,项目名称:CSharpMir,代码行数:17,代码来源:MapObject.cs


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