Package fr.umlv.escapeir.state

Source Code of fr.umlv.escapeir.state.WinState

package fr.umlv.escapeir.state;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Rectangle;

import fr.umlv.escapeir.EscapeIR;
import fr.umlv.zen2.ApplicationContext;
import fr.umlv.zen2.ApplicationRenderCode;

public class WinState extends AbstractState {

  public WinState(ApplicationContext context) {
    super(context);
  }

  @Override
  public void update(double delta) {
  }

  @Override
  public void render() {
    this.getContext().render(new ApplicationRenderCode() {
      @Override
      public void render(Graphics2D graphics) {
              graphics.setColor(Color.BLACK);
              graphics.fill(new Rectangle(0, 0, EscapeIR.WIDTH, EscapeIR.HEIGHT));
             
              graphics.setColor(Color.GREEN);
              graphics.drawString("You win", EscapeIR.WIDTH / 2, EscapeIR.HEIGHT / 2);
      }
    });
  }

}
TOP

Related Classes of fr.umlv.escapeir.state.WinState

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.