本文整理汇总了C#中LeagueSharp.Common.Utility类的典型用法代码示例。如果您正苦于以下问题:C# Utility类的具体用法?C# Utility怎么用?C# Utility使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Utility类属于LeagueSharp.Common命名空间,在下文中一共展示了Utility类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
public static void Initialize(Utility.HpBarDamageIndicator.DamageToUnitDelegate damageToUnit)
{
_damageToUnit = damageToUnit;
DrawingColor = Color.Green.ToArgb(150);
Enabled = true;
Drawing.OnDraw += OnDrawingDraw;
}
示例2: Initialize
public static void Initialize(Utility.HpBarDamageIndicator.DamageToUnitDelegate damageToUnit)
{
CustomDamageIndicator.damageToUnit = damageToUnit;
DrawingColor = Color.LawnGreen;
Enabled = true;
Drawing.OnDraw += Drawing_OnDraw;
}
示例3: Initialize
public static void Initialize(Utility.HpBarDamageIndicator.DamageToUnitDelegate damageToUnit)
{
// Apply needed field delegate for damage calculation
_damageToUnit = damageToUnit;
DrawingColor = Color.Green;
Enabled = true;
// Register event handlers
Drawing.OnDraw += Drawing_OnDraw;
}
示例4: DamageIndicator
public DamageIndicator(Utility.HpBarDamageIndicator.DamageToUnitDelegate _delegate, int range, bool debugger=false)
{
DxLine=new Line(DxDevice) {Width=9};
_debugger=debugger;
Range=range;
_damageToUnitDelegate=_delegate;
LeagueSharp.Drawing.OnDraw+=Drawing_OnDraw;
LeagueSharp.Drawing.OnPreReset+=DrawingOnOnPreReset;
LeagueSharp.Drawing.OnPostReset+=DrawingOnOnPostReset;
AppDomain.CurrentDomain.DomainUnload+=CurrentDomainOnDomainUnload;
AppDomain.CurrentDomain.ProcessExit+=CurrentDomainOnDomainUnload;
}
示例5: AltarObject
public AltarObject(float spawnTime,
float respawnTime,
Vector3 position,
string objectNameAlly,
string objectNameEnemy,
Utility.Map.MapType mapType)
{
SpawnTime = spawnTime;
RespawnTime = respawnTime;
ObjectNameAlly = objectNameAlly;
ObjectNameEnemy = objectNameEnemy;
Position = position;
MinimapPosition = Drawing.WorldToMinimap(Position);
MapType = mapType;
}
示例6: Initialize
public static void Initialize(Utility.HpBarDamageIndicator.DamageToUnitDelegate damageToUnit)
{
if (initialized)
return;
// Apply needed field delegate for damage calculation
CustomDamageIndicator.damageToUnit = damageToUnit;
Color = System.Drawing.Color.Aqua;
// Register event handlers
Drawing.OnDraw += Drawing_OnDraw;
Drawing.OnPreReset += Drawing_OnPreReset;
Drawing.OnPostReset += Drawing_OnOnPostReset;
AppDomain.CurrentDomain.DomainUnload += OnProcessExit;
AppDomain.CurrentDomain.ProcessExit += OnProcessExit;
initialized = true;
}
示例7: GetJungleMobByName
private JungleMob GetJungleMobByName(string name, Utility.Map.MapType mapType)
{
return JungleMobs.Find(jm => jm.Name == name && jm.MapType == mapType);
}
示例8: GetJungleCampByID
private JungleCamp GetJungleCampByID(int id, Utility.Map.MapType mapType)
{
return JungleCamps.Find(jm => jm.CampId == id && jm.MapType == mapType);
}
示例9: TryCast
private void TryCast(Utility.DelayAction.Callback cast)
{
Utility.DelayAction.Add(0, cast);
Utility.DelayAction.Add(100, cast);
Utility.DelayAction.Add(200, cast);
Utility.DelayAction.Add(300, cast);
}
示例10: JungleCamp
public JungleCamp(String name, GameObjectTeam team, int campId, int spawnTime, int respawnTime,
Utility.Map.MapType mapType, Vector3 mapPosition, Vector3 minimapPosition, JungleMob[] creeps)
{
Name = name;
Team = team;
CampId = campId;
SpawnTime = spawnTime;
RespawnTime = respawnTime;
MapType = mapType;
MapPosition = mapPosition;
MinimapPosition = minimapPosition;
Creeps = creeps;
NextRespawnTime = 0;
Called = false;
}
示例11: Camp
public Camp(string name,
float spawnTime,
int respawnTimer,
Vector3 position,
List<Mob> mobs,
Utility.Map.MapType mapType,
GameObjectTeam team,
Color colour,
Timers timer,
bool isRanged = false,
int state = 0,
int respawnTime = 0,
int lastChangeOnState = 0)
{
Name = name;
SpawnTime = spawnTime;
RespawnTimer = respawnTimer;
Position = position;
MapPosition = Drawing.WorldToScreen(Position);
MinimapPosition = Drawing.WorldToMinimap(Position);
Mobs = mobs;
MapType = mapType;
Team = team;
Colour = colour;
IsRanged = isRanged;
State = state;
RespawnTime = respawnTime;
LastChangeOnState = lastChangeOnState;
Timer = timer;
}
示例12: Camp
public Camp(string name,
float spawnTime,
int respawnTimer,
Vector3 position,
List<Mob> mobs,
Utility.Map.MapType mapType,
GameObjectTeam team,
Color colour,
Timers timer,
bool isRanged = false,
int state = 0,
int respawnTime = 0,
int lastChangeOnState = 0,
bool shouldping = true,
int lastPing = 0)
{
Name = name;
SpawnTime = spawnTime;
RespawnTimer = respawnTimer;
Position = position;
MapPosition = Drawing.WorldToScreen(Position);
MinimapPosition = Drawing.WorldToMinimap(Position);
Mobs = mobs;
MapType = mapType;
Team = team;
Colour = colour;
IsRanged = isRanged;
State = state;
RespawnTime = respawnTime;
LastChangeOnState = lastChangeOnState;
Timer = timer;
ShouldPing = shouldping;
LastPing = lastPing;
#region Load Text
TextMinimap = new Render.Text(0, 0, "", Program._menu.Item("timerfontminimap").GetValue<Slider>().Value, Program.White)
{
VisibleCondition =
sender =>
Program.Timeronminimap && RespawnTime > Environment.TickCount && State == 7,
PositionUpdate = delegate
{
Vector2 v2 = Timer.MinimapPosition;
return v2;
},
TextUpdate = () => Timer.TextOnMinimap,
OutLined = false,
Centered = true
};
TextMinimap.Add();
TextMap = new Render.Text(0, 0, "", Program._menu.Item("timerfontmap").GetValue<Slider>().Value, Program.White)
{
VisibleCondition =
sender =>
Program.Timeronmap && RespawnTime > Environment.TickCount && State == 7 && Position.IsOnScreen(),
PositionUpdate = delegate
{
Vector2 v2 = Timer.Position;
return v2;
},
TextUpdate = () => Timer.TextOnMap,
OutLined = false,
Centered = true
};
TextMap.Add();
#endregion
//Drawing.OnEndScene += Drawing_OnEndScene;
}
示例13: JungleCamp
public JungleCamp(String name, GameObjectTeam team, int campId, int spawnTime, int respawnTime,
Utility.Map.MapType mapType, Vector3 mapPosition, Vector3 minimapPosition, JungleMob[] creeps)
{
Name = name;
Team = team;
CampId = campId;
SpawnTime = spawnTime;
RespawnTime = respawnTime;
MapType = mapType;
MapPosition = mapPosition;
MinimapPosition = minimapPosition;
Creeps = creeps;
NextRespawnTime = 0;
Called = false;
Dead = false;
Visible = false;
TextMinimap = new Render.Text(0, 0, "", Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue<Slider>().Value, new ColorBGRA(Color4.White));
Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").ValueChanged += JungleCamp_ValueChanged;
TextMinimap.TextUpdate = delegate
{
return (NextRespawnTime - (int)Game.ClockTime).ToString();
};
TextMinimap.PositionUpdate = delegate
{
Vector2 sPos = Drawing.WorldToMinimap(MinimapPosition);
return new Vector2(sPos.X, sPos.Y);
};
TextMinimap.VisibleCondition = sender =>
{
return IsActive() && NextRespawnTime > 0 && MapType == GMap.Type;
};
TextMinimap.OutLined = true;
TextMinimap.Centered = true;
TextMinimap.Add();
TextMap = new Render.Text(0, 0, "", (int)(Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue<Slider>().Value * 3.5), new ColorBGRA(Color4.White));
TextMap.TextUpdate = delegate
{
return (NextRespawnTime - (int)Game.ClockTime).ToString();
};
TextMap.PositionUpdate = delegate
{
Vector2 sPos = Drawing.WorldToScreen(MapPosition);
return new Vector2(sPos.X, sPos.Y);
};
TextMap.VisibleCondition = sender =>
{
return IsActive() && NextRespawnTime > 0 && MapType == GMap.Type;
};
TextMap.OutLined = true;
TextMap.Centered = true;
TextMap.Add();
}
示例14: GetJungleMobByName
private JungleMob GetJungleMobByName(string name, Utility.Map.MapType mapType)
{
return JungleMobs.Find(jm => name.Contains(jm.Name) && jm.MapType == mapType);
}
示例15: JungleCamp
/// <summary>
/// Initializes a new instance of the <see cref="JungleCamp" /> class.
/// </summary>
/// <param name="respawnTime">The respawn time.</param>
/// <param name="position">The position.</param>
/// <param name="mobNames">The mob names.</param>
/// <param name="mapType">Type of the map.</param>
/// <param name="team">The team.</param>
public JungleCamp(
int respawnTime,
Vector3 position,
string[] mobNames,
Utility.Map.MapType mapType,
GameObjectTeam team)
{
this.RespawnTime = respawnTime;
this.Position = position;
this.MobNames = mobNames;
this.MapType = mapType;
this.Team = team;
this.ObjectsDead = new List<string>();
this.ObjectsAlive = new List<string>();
}