Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 public AbilityDetails(Obj_AI_Hero owner, GameObject sender, Render.Text text)
 {
     Owner = owner;
     Sender = sender;
     Text = text;
 }
Ejemplo n.º 3
0
 public InternalGankTracker(Render.Line line)
 {
     Line = line;
 }
Ejemplo n.º 4
0
 /// <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)); };
 }
Ejemplo n.º 5
0
 public InternalKillable(Combo combo, Render.Text text)
 {
     Combo = combo;
     Text = text;
 }
Ejemplo n.º 6
0
 public InternalGankDetector(Render.Text text, Render.Line line)
 {
     Text = text;
     Line = line;
 }
Ejemplo n.º 7
0
            /// <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;
                }
            }
Ejemplo n.º 8
0
 private static void Sprite_OnReset(Render.Sprite sprite)
 {
     var w = sprite.Width;
     sprite.Scale = _scale;
     Crop(sprite, w == 85);
 }
Ejemplo n.º 9
0
 private static void Crop(Render.Sprite sprite, bool isMajor = false)
 {
     var dimensions = isMajor ? MajorCampSpriteDimensions : MinorCampSpriteDimensions;
     sprite.Crop(0, 0, dimensions[0], dimensions[1], true);
 }
Ejemplo n.º 10
0
 public HealthConf(object obj, Render.Text text)
 {
     Obj = obj;
     Text = text;
 }
Ejemplo n.º 11
0
 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;
     }
 }
Ejemplo n.º 12
0
 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);
 }