public override void Draw(ICurio curio, SceneGame scene, DrawPass pass) { var spriteHelmetForward = SpriteLoader.Instance.AddSprite("content/player_helmet_5"); var spriteHelmetBack = SpriteLoader.Instance.AddSprite("content/player_helmet_4"); var spriteBodyForward = SpriteLoader.Instance.AddSprite("content/player_forward"); var spriteBodyBack = SpriteLoader.Instance.AddSprite("content/player_back"); var spriteSword = SpriteLoader.Instance.AddSprite("content/player_sword"); var spriteGrip = SpriteLoader.Instance.AddSprite("content/player_grip"); var spriteSwordBlood = SpriteLoader.Instance.AddSprite("content/player_sword_bloody"); var spriteSwordHeart = SpriteLoader.Instance.AddSprite("content/player_sword_heart"); var spriteWings = SpriteLoader.Instance.AddSprite("content/player_wings"); var sword = curio.GetBehavior <BehaviorSword>(); var grapple = curio.GetBehavior <BehaviorGrapplingHook>(); var player = curio.GetBehavior <BehaviorPlayer>(); var alive = curio.GetBehavior <BehaviorAlive>(); if (alive.Armor > 0) { spriteBodyForward = SpriteLoader.Instance.AddSprite("content/player_forward_armor"); spriteBodyBack = SpriteLoader.Instance.AddSprite("content/player_back_armor"); } var world = curio.GetWorld(); var center = curio.GetVisualPosition() + new Vector2(8, 8); var offset = curio.GetOffset(); var color = curio.GetColor(); var angleBody = curio.GetVisualAngle(); scene.PushSpriteBatch(shader: scene.Shader, shaderSetup: (transform, projection) => { scene.SetupColorMatrix(color); }); if (grapple != null && grapple.ShouldRender) { var angleGrapple = angleBody + grapple.VisualAngle(); scene.DrawSpriteExt(spriteGrip, 0, center + offset - spriteGrip.Middle, spriteGrip.Middle, angleGrapple, new Vector2(1), SpriteEffects.None, Color.White, 0); } if (sword != null) { var angleSword = angleBody + sword.VisualAngle(); if (sword.HasBlood) { spriteSword = spriteSwordBlood; } scene.DrawSpriteExt(spriteSword, 0, center + offset - spriteSword.Middle, spriteSword.Middle, angleSword, new Vector2(sword.VisualScale()), SpriteEffects.None, Color.White, 0); if (sword.HasHeart) { scene.DrawSpriteExt(spriteSwordHeart, 0, center + offset - spriteSwordHeart.Middle, spriteSwordHeart.Middle, angleSword, new Vector2(sword.VisualScale()), SpriteEffects.None, Color.White, 0); } } SpriteReference spriteHelmet; SpriteReference spriteBody; float headPos = MathHelper.Lerp(-4, 4, player.ForwardBack); if (player.ForwardBack > 0.5f) { spriteHelmet = spriteHelmetForward; spriteBody = spriteBodyForward; } else { spriteHelmet = spriteHelmetBack; spriteBody = spriteBodyBack; } scene.DrawSpriteExt(spriteBody, 0, center + offset - spriteBody.Middle, spriteBody.Middle, angleBody, new Vector2(1), SpriteEffects.None, Color.White, 0); scene.DrawSpriteExt(spriteHelmet, (int)(player.HairFrame / 4), center + offset + Util.AngleToVector(angleBody) * headPos - spriteHelmet.Middle, spriteHelmet.Middle, angleBody, new Vector2(1), SpriteEffects.None, Color.White, 0); //scene.PushSpriteBatch(blendState: BlendState.Additive); //scene.DrawSpriteExt(spriteWings, 0, center + offset - spriteWings.Middle, spriteWings.Middle, angleBody, new Vector2(1), SpriteEffects.None, new Color(200, 192, 255), 0); //scene.PopSpriteBatch(); scene.PopSpriteBatch(); }
public override void Draw(SceneGame scene, DrawPass pass) { DrawNode(scene, Fill); }
internal static extern void Internal_SetDrawModes(IntPtr obj, DrawPass value);
public override void Draw(SceneGame scene, DrawPass pass) { scene.SpriteBatch.Draw(scene.Pixel, Rectangle.ToRectangle(), Color); }
public override void Draw(SceneGame scene, DrawPass pass) { scene.SetupColorMatrix(ColorMatrix.HasValue ? ColorMatrix.Value : RoguelikeEngine.ColorMatrix.Identity, scene.WorldTransform, scene.Projection); scene.DrawCircle(Sprite, SamplerState, Position, Precision, AngleStart, AngleEnd, Radius, TexOffset, TexPrecision, Start, End); }
public override void Draw(SceneGame scene, DrawPass pass) { var bloodSpatter = SpriteLoader.Instance.AddSprite("content/blood_spatter"); scene.DrawSpriteExt(bloodSpatter, scene.AnimationFrame(bloodSpatter, Frame, FrameEnd), Position - bloodSpatter.Middle, bloodSpatter.Middle, Angle, SpriteEffects.None, 0); }
public abstract void Draw(SceneGame scene, DrawPass pass);
public virtual void Draw(SceneGame scene, DrawPass pass) { //NOOP }
public override void Draw(SceneGame scene, DrawPass pass) { var statusPoisoned = SpriteLoader.Instance.AddSprite("content/status_poisoned"); scene.DrawSpriteExt(statusPoisoned, (int)(Frame * 0.25f), HeadPosition - statusPoisoned.Middle, statusPoisoned.Middle, 0, SpriteEffects.None, 0); }
internal static extern void Internal_ExecuteDrawCalls(IntPtr obj, IntPtr task, IntPtr output, IntPtr outputDepth, RenderTask.DrawCall[] drawCalls, DrawPass pass);
public override void Draw(SceneGame scene, DrawPass pass) { var charge = SpriteLoader.Instance.AddSprite("content/charge"); scene.DrawSpriteExt(charge, (int)-Frame, Position - charge.Middle, charge.Middle, Angle, SpriteEffects.None, 0); }
public DrawableTile(string id, SpriteReference sprite, DrawPass pass) : base(id) { Sprite = sprite; Icon = sprite; Pass = pass; }
public override void Draw(SceneGame scene, DrawPass pass) { var aimingreticule = SpriteLoader.Instance.AddSprite("content/aim_reticule"); scene.DrawSpriteExt(aimingreticule, 0, Position - aimingreticule.Middle, aimingreticule.Middle, 0, SpriteEffects.None, 0); }
public void Draw(SceneGame scene, DrawPass pass) { var pos = Curio.GetVisualTarget(); SkillUtil.DrawPointer(scene, pos, "KILL"); }
public override void Draw(SceneGame scene, DrawPass pass) { var snakeHeadOpen = SpriteLoader.Instance.AddSprite("content/snake_open"); scene.DrawSpriteExt(snakeHeadOpen, 0, Position - snakeHeadOpen.Middle, snakeHeadOpen.Middle, Rotation * Frame, Mirror, 0); }
public override void Draw(SceneGame scene, DrawPass pass) { var hydraBody = SpriteLoader.Instance.AddSprite("content/hydra_body"); scene.DrawSprite(hydraBody, (int)WalkFrame, Position - hydraBody.Middle + new Vector2(0, -4) + VisualOffset(), Facing == HorizontalFacing.Right ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 1); }
public override void Draw(ICurio curio, SceneGame scene, DrawPass pass) { //NOOP; }
public override void Draw(SceneGame scene, DrawPass pass) { var ring = SpriteLoader.Instance.AddSprite("content/circle_shockwave"); scene.DrawCircle(ring, 0, Position, Size, Color); }
public override void Draw(SceneGame scene, DrawPass pass) { scene.DrawHuman(this); scene.DrawWireCircle(Position, 16, 20, Color.Red); }
public override void Draw(SceneGame scene, DrawPass pass) { float size = (float)ScaleLerp(SizeStart, SizeEnd, Frame.Slide); scene.DrawSpriteExt(Sprite, 0, CurrentPosition - Sprite.Middle, Sprite.Middle, Angle, new Vector2(size), SpriteEffects.None, Color, 0); }
public override void Draw(SceneGame scene, DrawPass pass) { throw new NotImplementedException(); }
public override void Draw(SceneGame scene, DrawPass pass) { var fade = (float)FadeLerp(1, 0, Frame.Slide); scene.DrawSpriteExt(Sprite, SubImage, Position - Sprite.Middle, Sprite.Middle, Angle, new Vector2(1), SpriteEffects.None, Color.WithAlpha(fade), 0); }
public override void Draw(SceneGame scene, DrawPass pass) { scene.SpriteBatch.Draw(Sprite.Texture, Position - Sprite.Middle * Scale, new Rectangle(OffsetX, OffsetY, (int)(Sprite.Width * Scale), (int)(Sprite.Height * Scale)), Color); }
public override void Draw(SceneGame scene, DrawPass pass) { ProtoEffect.Draw(scene, Position); }
public override void Draw(SceneGame scene, DrawPass pass) { DrawNode(scene, Powered ? 1.0f : 0.0f); }
public override void Draw(SceneGame scene, DrawPass pass) { ProtoEffect.Draw(scene, Sword.GetBlade(BladeLength)); }
public override void Draw(SceneGame scene, DrawPass pass) { var sawsprite = SpriteLoader.Instance.AddSprite("content/orb_red_saw"); scene.DrawSpriteExt(sawsprite, 0, Position - sawsprite.Middle, sawsprite.Middle, Angle, SpriteEffects.None, 0); }
public void Draw(SceneGame scene, DrawPass pass) { Drawable.Draw(Curio, scene, pass); }
public override void Draw(SceneGame scene, DrawPass pass) { //NOOP }
public abstract void Draw(ICurio curio, SceneGame scene, DrawPass pass);