コード例 #1
0
ファイル: ActiveBox.cs プロジェクト: warrocky/FightLands
        public override void Draw(DrawState state)
        {
            if (reDrawing)
                camera.Draw(state);

            texture.Draw(state);
        }
コード例 #2
0
ファイル: Graphics.cs プロジェクト: warrocky/FightLands
 public static void Draw()
 {
     if (baseCamera != null)
     {
         DrawState state = new DrawState();
         baseCamera.Draw(state);
     }
 }
コード例 #3
0
ファイル: WaterTile.cs プロジェクト: warrocky/FightLands
 public override void Draw(DrawState state)
 {
     lock (textureLoadedLock)
     {
         if (textureLoaded)
         {
             texture.Draw(state);
         }
     }
 }
コード例 #4
0
        public void Draw(DrawState state)
        {
            Vector2 drawPosition = parent.position + MathHelper.rotateVector2(parent.rotation, position);
            drawPosition = drawPosition - state.currentCamera.position;
            drawPosition *= state.currentCamera.zoom;
            drawPosition = MathHelper.rotateVector2(-state.currentCamera.rotation, drawPosition);
            drawPosition += state.currentCamera.diagonal / 2f;

            state.currentCamera.addDrawCall(new DrawCallTexture(texture, drawPosition, rotation + parent.rotation - state.currentCamera.rotation, filter, textureScale*state.currentCamera.zoom, layer));
        }
コード例 #5
0
ファイル: DrawableText.cs プロジェクト: warrocky/FightLands
        public void Draw(DrawState state)
        {
            Vector2 drawPosition = parent.position + MathHelper.rotateVector2(parent.rotation, position);
            drawPosition = drawPosition - state.currentCamera.position;
            drawPosition *= state.currentCamera.zoom;
            drawPosition = MathHelper.rotateVector2(-state.currentCamera.rotation, drawPosition);
            drawPosition += state.currentCamera.diagonal / 2f;

            state.currentCamera.addDrawCall(new DrawCallSpriteFontText(font, text, filter, drawPosition, rotation + parent.rotation - state.currentCamera.rotation, layer, scale*state.currentCamera.zoom));
        }
コード例 #6
0
ファイル: Camera.cs プロジェクト: warrocky/FightLands
        public void Draw(DrawState state)
        {
            Camera previousCamera = state.currentCamera;
            if(previousCamera != null)
                previousCamera.addSubBatch(this);
            state.currentCamera = this;

            world.Draw(state);

            state.currentCamera = previousCamera;
        }
コード例 #7
0
        public void Draw(DrawState state)
        {
            Vector2 drawPosition = parent.position + MathHelper.rotateVector2(parent.rotation, position);
            drawPosition = drawPosition - state.currentCamera.position;
            drawPosition *= state.currentCamera.zoom;
            drawPosition = MathHelper.rotateVector2(-state.currentCamera.rotation, drawPosition);
            drawPosition += state.currentCamera.diagonal / 2f;

            int phase;

            phase = (((int)(this._phase * (textures.Length))) % textures.Length + textures.Length) % textures.Length;
            Vector2 scale = new Vector2(size.X / (float)textures[phase].width, size.Y / (float)textures[phase].height);

            state.currentCamera.addDrawCall(new DrawableTexture.DrawCallTexture(textures[phase], drawPosition, rotation + parent.rotation - state.currentCamera.rotation, filter, textureScale * state.currentCamera.zoom, layer));
        }
コード例 #8
0
        public void Draw(DrawState state)
        {
            Vector2 drawPosition = parent.position + MathHelper.rotateVector2(parent.rotation, position);
            drawPosition = drawPosition - state.currentCamera.position;
            drawPosition *= state.currentCamera.zoom;
            drawPosition = MathHelper.rotateVector2(-state.currentCamera.rotation, drawPosition);
            drawPosition += state.currentCamera.diagonal / 2f;

            int phase;
            if (texture.length != 0)
            {
                phase = (((int)(this._phase * (texture.length))) % texture.length + texture.length) % texture.length;
            }
            else
            {
                phase = 0;
            }

            state.currentCamera.addDrawCall(new DrawCallTextureStrip(texture, drawPosition, rotation + parent.rotation - state.currentCamera.rotation, filter, textureScale * state.currentCamera.zoom, layer, texture.getRectangleFrame((int)phase)));
        }
コード例 #9
0
 public override void Draw(DrawState state)
 {
     minimap.Draw(state);
 }
コード例 #10
0
ファイル: GameObject.cs プロジェクト: warrocky/FightLands
 public virtual void Draw(DrawState state)
 {
 }
コード例 #11
0
ファイル: Encounter.cs プロジェクト: warrocky/FightLands
 public override void Draw(DrawState state)
 {
     Dummy.Draw(state);
 }
コード例 #12
0
 public override void Draw(DrawState state)
 {
     texture.Draw(state);
 }
コード例 #13
0
ファイル: Encounter.cs プロジェクト: warrocky/FightLands
 public override void Draw(DrawState state)
 {
     Dummy.Draw(state);
 }
コード例 #14
0
ファイル: LandManager.cs プロジェクト: warrocky/FightLands
 public override void Draw(DrawState state)
 {
     background.Draw(state);
 }
コード例 #15
0
ファイル: Tree.cs プロジェクト: warrocky/FightLands
 public override void Draw(DrawState state)
 {
     shadowTexture.Draw(state);
     drawTexture.Draw(state);
 }
コード例 #16
0
ファイル: MapPreviewer.cs プロジェクト: warrocky/FightLands
 public override void Draw(DrawState state)
 {
     minimap.Draw(state);
 }
コード例 #17
0
ファイル: Tree.cs プロジェクト: warrocky/FightLands
 public override void Draw(DrawState state)
 {
     shadowTexture.Draw(state);
     drawTexture.Draw(state);
 }
コード例 #18
0
 public virtual void Draw(DrawState state)
 {
 }
コード例 #19
0
 public override void Draw(DrawState state)
 {
     base.Draw(state);
 }
コード例 #20
0
ファイル: World.cs プロジェクト: warrocky/FightLands
 public virtual void Draw(DrawState state)
 {
     for (int i = 0; i < objectList.Count; i++)
         objectList[i].Draw(state);
 }
コード例 #21
0
ファイル: FightWorld.cs プロジェクト: warrocky/FightLands
 public override void Draw(DrawState state)
 {
     base.Draw(state);
 }
コード例 #22
0
ファイル: HumanPlayer.cs プロジェクト: warrocky/FightLands
 public override void Draw(DrawState state)
 {
     guy.Draw(state);
 }
コード例 #23
0
 public override void Draw(DrawState state)
 {
     guy.Draw(state);
 }
コード例 #24
0
ファイル: LandManager.cs プロジェクト: warrocky/FightLands
 public override void Draw(DrawState state)
 {
     background.Draw(state);
 }
コード例 #25
0
 public override void Draw(DrawState state)
 {
     statusText.Draw(state);
     statusBar.Draw(state);
 }
コード例 #26
0
ファイル: Rat.cs プロジェクト: warrocky/FightLands
 public override void Draw(DrawState state)
 {
     texture.Draw(state);
 }
コード例 #27
0
 public override void Draw(DrawState state)
 {
     statusText.Draw(state);
     statusBar.Draw(state);
 }