package sillysagiri;

import javax.microedition.lcdui.Graphics;

public class Sagiri 
{
  public final static int TOUCH_NONE = 0;
  public final static int TOUCH_BEGIN = 1;
  public final static int TOUCH_END = 2;
  public final static int TOUCH_DRAG = 3;

  public static Sagiri _instance = null;

  public Input input;

  public int fps = 20;

  private Scene _scene_current;
  private long _time_begin;
  private long _time_delta;
  
  public Sagiri()
  {
    _instance = this;
    input = new Input();
    _scene_current = null;
  }

  public void Update(Graphics g)
  {
    _time_begin = System.currentTimeMillis();

    input.Update();
    if (_scene_current != null) 
    _scene_current.Update(_time_delta = System.currentTimeMillis() - _time_begin, g);
  }

  public final long GetFrameTime() { return _time_delta; }
}
