public Draw ( Microsoft.Xna.Framework.Graphics.Texture2D Texture, |
||
Texture | Microsoft.Xna.Framework.Graphics.Texture2D | |
Bounds | ||
리턴 | void |
public void Draw(Batch Batch, Vector2 Position, float LayerOffset) { if (Back > 0) { Mod.Tile Tile = Mod.Back[Back]; if (!Tile.Invisible || (Game.State == Game.States.MapEditor)) { if (Textures.Exists("Tiles.Back." + Back)) Batch.Draw(Textures.Get("Tiles.Back." + Back), Position, null, Color.White, 0, Origin.Center, 1, SpriteEffects.None, (.8f + LayerOffset)); if (BackAnimation != null) Batch.Draw(BackAnimation.Texture(), Position, null, Color.White, 0, Origin.Center, 1, SpriteEffects.None, (.75f + LayerOffset)); } } if (Fore > 0) { Mod.Tile Tile = Mod.Fore[Fore]; if (!Tile.Invisible || (Game.State == Game.States.MapEditor)) { float Layer = ((Mod.Fore[Fore].Type == Mod.Tile.Types.Wall) ? .4f : (Mod.Fore[Fore].Type == Mod.Tile.Types.Platform) ? .5f : .6f); if (Textures.Exists("Tiles.Fore." + Fore)) Batch.Draw(Textures.Get("Tiles.Fore." + Fore), Position, null, Color.White, MathHelper.ToRadians((Angle / 128f) * 360), Origin.Center, 1, SpriteEffects.None, (Layer + LayerOffset)); if (ForeAnimation != null) Batch.Draw(ForeAnimation.Texture(), Position, null, Color.White, MathHelper.ToRadians((Angle / 128f) * 360), Origin.Center, 1, SpriteEffects.None, (Layer - .05f + LayerOffset)); if (Mod.Fore[Fore].Border) Batch.Draw(Textures.Get("Tiles.Fore." + Fore + "b"), Position, null, Color.Black, MathHelper.ToRadians((Angle / 128f) * 360), Origin.Center, 1, SpriteEffects.None, (Layer + .05f + LayerOffset)); } } //Batch.Draw(Pixel(Color.Black, true), new Rectangle((int)(Position.X - (Width / 2f)), (int)(Position.Y - (Height / 2f)), Width, Height), null, (Color.White * (1 - (Light / 255f))), 0, Origin.None); //Batch.DrawString(Light.ToString(), Fonts.Get("Default/Tiny"), (Position - new Vector2(0, 5)), Origin.Center, Color.White, null, 0, .85f); //Batch.DrawString(Max.ToString(), Fonts.Get("Default/Tiny"), (Position + new Vector2(0, 5)), Origin.Center, Color.White, null, 0, .85f); //Batch.DrawString(State.ToString(), Fonts.Get("Default/Tiny"), Position, Origin.Center, Color.White, null, 0, .85f); }
public void Draw(Batch Batch, Color Color, float Thickness = 1, SpriteEffects Effect = SpriteEffects.None, float Layer = 0) { float Angle = (float)Math.Atan2((End.Y - Start.Y), (End.X - Start.X)), Length = Vector2.Distance(Start, End); Batch.Draw(Pixel(Color.White, true), Start, null, Color, Angle, Origin.None, new Vector2(Length, Thickness), Effect, Layer); }
public override void Draw(Batch Batch, Vector2 Position, Color Color, float Opacity, float Angle, Textures.Origin Origin, float Scale, SpriteEffects Effect = SpriteEffects.None, float Layer = 0) { Batch.Draw(Pixel(Color.Blue), Position, null, (Color.White * Opacity), Angle, Origin.Center, (32 * Scale), Effect, Layer); Mask.Draw(Color.White, 1); }
public void Draw(Batch Batch, Vector2 Position, Color Color, float Angle, Vector2 Scale, SpriteEffects Effect = SpriteEffects.None, float Layer = 0) { Batch.Draw(Texture(), Position, null, Color, Angle, Origin(), Scale, Effect, Layer); }
public void Draw(Batch Batch, Vector2 Position, Color Color, float Angle, Vector2 Scale, SpriteEffects Effect = SpriteEffects.None, float Layer = 0) { Batch.Draw(Texture(), Position, null, Color, Angle, Origin(), Scale, Effect, Layer); }
public static void Draw(this Texture2D Texture, Batch Batch, Rectangle Bounds, Rectangle?Source, Color Color, float Angle, Origin Origin, SpriteEffects Effect = SpriteEffects.None, float Layer = 0) { Batch.Draw(Texture, Bounds, Source, Color, Angle, Origin, Effect, Layer); }
public static void Draw(this Texture2D Texture, Batch Batch, Vector2 Position, Rectangle?Source, Color Color, float Angle, Origin Origin, Vector2 Scale, SpriteEffects Effect = SpriteEffects.None, float Layer = 0) { Batch.Draw(Texture, Position, Source, Color, Angle, Origin, Scale, Effect, Layer); }
public static void Draw(this Texture2D Texture, Batch Batch, Vector2 Position, Rectangle? Source, Color Color, float Angle, Origin Origin, Vector2 Scale, SpriteEffects Effect = SpriteEffects.None, float Layer = 0) { Batch.Draw(Texture, Position, Source, Color, Angle, Origin, Scale, Effect, Layer); }
public static void Draw(this Texture2D Texture, Batch Batch, Rectangle Bounds, Rectangle? Source, Color Color, float Angle, Origin Origin, SpriteEffects Effect = SpriteEffects.None, float Layer = 0) { Batch.Draw(Texture, Bounds, Source, Color, Angle, Origin, Effect, Layer); }
public override void Draw(Batch Batch, Vector2 Position, Color Color, float Opacity, float Angle, Origin Origin, float Scale, SpriteEffects Effect = SpriteEffects.None, float Layer = 0) { /*Batch.Draw(Textures.Get("Players.1-" + Mod.Weapons[Weapon].Texture), Position, null, (Color.Black * (Opacity * .65f)), Angle, new Origin(Mod.Weapons[Weapon].Player.X, Mod.Weapons[Weapon].Player.Y), Scale, SpriteEffects.None, .425002f);*/ if (!Dead) { if (Vector2.Distance(InterpolatedPosition, Position) <= 50) { Vector2 ShadowPosition = Globe.Move(InterpolatedPosition, Globe.Angle(new Vector2((Map.Width / 2f), (Map.Height / 2f)), InterpolatedPosition), (4 + (Vector2.Distance(new Vector2((Map.Width / 2f), (Map.Height / 2f)), InterpolatedPosition) / 250))); Batch.Draw(Textures.Get("Players.1-" + Mod.Weapons[Weapon].Texture), ShadowPosition, null, (Color.Black * (Opacity * .35f)), InterpolatedAngle, new Origin(Mod.Weapons[Weapon].Player.X, Mod.Weapons[Weapon].Player.Y), Scale, SpriteEffects.None, .425001f); Batch.Draw(Textures.Get("Players.1-" + Mod.Weapons[Weapon].Texture), InterpolatedPosition, null, (Color * Opacity), InterpolatedAngle, new Origin(Mod.Weapons[Weapon].Player.X, Mod.Weapons[Weapon].Player.Y), Scale, SpriteEffects.None, .425f); } else { Vector2 ShadowPosition = Globe.Move(Position, Globe.Angle(new Vector2((Map.Width / 2f), (Map.Height / 2f)), Position), (4 + (Vector2.Distance(new Vector2((Map.Width / 2f), (Map.Height / 2f)), Position) / 250))); Batch.Draw(Textures.Get("Players.1-" + Mod.Weapons[Weapon].Texture), ShadowPosition, null, (Color.Black * (Opacity * .35f)), Angle, new Origin(Mod.Weapons[Weapon].Player.X, Mod.Weapons[Weapon].Player.Y), Scale, SpriteEffects.None, .425001f); Batch.Draw(Textures.Get("Players.1-" + Mod.Weapons[Weapon].Texture), Position, null, (Color.Black * (Opacity * .65f)), Angle, new Origin(Mod.Weapons[Weapon].Player.X, Mod.Weapons[Weapon].Player.Y), Scale, SpriteEffects.None, .425001f); } } //Mask.Draw(Color.White, 1); }
public virtual void Draw(Batch Batch, Vector2 Position, Color Color, float Opacity, float Angle, Origin Origin, Vector2 Scale, SpriteEffects Effect = SpriteEffects.None, float Layer = 0) { Batch.Draw(Texture, Position, null, (Color * Opacity), Angle, Origin, Scale, Effect, Angle); }
public virtual void Draw(Batch Batch, Vector2 Position, Color Color, float Opacity, float Angle, Origin Origin, Vector2 Scale, SpriteEffects Effect = SpriteEffects.None, float Layer = 0) { Batch.Draw(Texture, Position, null, (Color * Opacity), Angle, Origin, Scale, Effect, Layer); }