本文整理汇总了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();
}
示例2: RemoveObject
public void RemoveObject(MapObject ob)
{
CellObjects.Remove(ob);
if (CellObjects.Count == 0) CellObjects = null;
else Sort();
}
示例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;
}
示例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;
}
示例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);
}
示例6: SortObject
public void SortObject(MapObject ob)
{
M2CellInfo[ob.MapLocation.X, ob.MapLocation.Y].Sort();
}
示例7: AddObject
public void AddObject(MapObject ob)
{
M2CellInfo[ob.MapLocation.X, ob.MapLocation.Y].AddObject(ob);
}
示例8: RemoveObject
public void RemoveObject(MapObject ob)
{
M2CellInfo[ob.MapLocation.X, ob.MapLocation.Y].RemoveObject(ob);
}
示例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;
}
示例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();
}
示例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);
}
示例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);
}
示例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;
}
示例14: ClearMagic
public void ClearMagic()
{
NextMagic = null;
NextMagicDirection = 0;
NextMagicLocation = Point.Empty;
NextMagicObject = null;
}
示例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();
}