private static bool MouseOnButton(Render.Sprite button) { Vector2 pos = Utils.GetCursorPos(); return ((pos.X >= button.Position.X) && pos.X <= (button.Position.X + button.Width) && pos.Y >= button.Position.Y && pos.Y <= (button.Position.Y + button.Height)); }
public AbilityDetails(Obj_AI_Hero owner, GameObject sender, Render.Text text) { Owner = owner; Sender = sender; Text = text; }
public InternalGankTracker(Render.Line line) { Line = line; }
/// <summary> /// The insert. /// </summary> /// <param name="Text"> /// The text. /// </param> public void Insert(Render.Text Text) { Text.VisibleCondition = (a) => { return this.ContentRectangle.Contains(new Vector2(Text.X, Text.Y)); }; }
public InternalKillable(Combo combo, Render.Text text) { Combo = combo; Text = text; }
public InternalGankDetector(Render.Text text, Render.Line line) { Text = text; Line = line; }
/// <summary> /// Initializes a new instance of the <see cref="SnowParticle" /> class. /// </summary> /// <param name="Rectangle"> /// The rectangle. /// </param> /// <param name="MaxOffset"> /// The max offset. /// </param> public SnowParticle(Render.Rectangle Rectangle, int MaxOffset = 15) { this._maxOffset = MaxOffset; this._rectangle = Rectangle; Rectangle.Add(); this._x = Rectangle.X; this._modifier = Program.Random.Next(1, 5); if (Program.Random.Next(0, 1000) >= Program.Random.Next(0, 1000)) { this._modifier = -this._modifier; } }
private static void Sprite_OnReset(Render.Sprite sprite) { var w = sprite.Width; sprite.Scale = _scale; Crop(sprite, w == 85); }
private static void Crop(Render.Sprite sprite, bool isMajor = false) { var dimensions = isMajor ? MajorCampSpriteDimensions : MinorCampSpriteDimensions; sprite.Crop(0, 0, dimensions[0], dimensions[1], true); }
public HealthConf(object obj, Render.Text text) { Obj = obj; Text = text; }
public static bool LoadTexture(String name, ref Render.Sprite texture, DownloadType type) { try { Bitmap map = null; if (!cachedMaps.ContainsKey(name)) { //map = DownloadImageRiot(name, type); cachedMaps.Add(name, (Bitmap)map.Clone()); } else { map = new Bitmap((Bitmap)cachedMaps[name].Clone()); } if (map == null) { texture = new Render.Sprite(MyResources["questionmark"], new Vector2(0, 0)); Console.WriteLine("SAwarness: " + name + " is missing. Please inform Screeder!"); return false; } texture = new Render.Sprite(map, new Vector2(0, 0)); //texture.UpdateTextureBitmap(map); return true; //texture = new Render.Sprite(map, new Vector2(0, 0)); } catch (Exception ex) { Console.WriteLine("SAwarness: Couldn't load texture: " + name + "\n Ex: " + ex); return false; } }
public static void LoadTexture(Bitmap map, ref Render.Sprite texture) { if (texture == null) texture = new Render.Sprite(MyResources["questionmark"], new Vector2(0, 0)); texture.UpdateTextureBitmap(map); }