about summary refs log tree commit diff stats
path: root/data/maps/the_partial/rooms/Control Center Entrance.txtpb
blob: e685822312b26851c193aaa71bb6c99f426cd484 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
name: "Control Center Entrance"
panels {
  name: "RETURN"
  path: "Panels/Control/panel_10"
  clue: "return"
  answer: "turn"
  symbols: SPARKLES
}
ports {
  name: "CC"
  path: "Components/Warps/worldport2"
  orientation: "north"
}
div>
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45






















                                                        
                                                    



                                                           
                                            

     
                                          

                              
                                          
         
                                     







                        
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.fourisland.fourpuzzle.util;

import com.fourisland.fourpuzzle.Game;

/**
 *
 * @author hatkirby
 */
public class Interval {
    
    private int wait;
    private Interval(int wait)
    {
        this.wait = wait;
    }
    
    public static Interval createTickInterval(int ticks)
    {
        return createMillisInterval(Game.FPS*ticks);
    }
    
    public static Interval createMillisInterval(int millis)
    {
        return new Interval(millis*1000000);
    }
    
    private long last = System.nanoTime();
    public boolean isElapsed()
    {
        if (last+wait < System.nanoTime())
        {
            last = System.nanoTime();
            
            return true;
        }
        
        return false;
    }

}