Optimizer1's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
5 (0.01 per day)
Joined:
18-January 13
Profile Views:
101
Last Active:
User is offline Jan 18 2013 11:04 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   Optimizer1 has not set their status

Posts I've Made

  1. In Topic: Timer problem (setImage)

    Posted 18 Jan 2013

    Hey pbl,

    That prints out 9 yes, but not on the screen like the others.. duno how to fix that though.
  2. In Topic: Timer problem (setImage)

    Posted 18 Jan 2013

    Well the wave starts after 10 seconds.. I got it to work now, i got this:

    import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
    import java.awt.Color;  
    import java.awt.Graphics;  
    import java.awt.Font;
    
    public class DisplayTime extends Game3
    {
        
        public void displayTime()
        {
            if((System.currentTimeMillis() - WaveGame3.timeEnd) < 10000){
               int time = ((int)(System.currentTimeMillis() - WaveGame3.timeEnd)/1000);
               if(time == 1){
                   GreenfootImage img = new GreenfootImage (100, 30);
                   img.drawString ("10", 2, 20);
                   setImage(img);
               }
               if(time == 2){
                   GreenfootImage img1 = new GreenfootImage (100, 30);
                   img1.drawString ("9", 200, 20);
                   setImage(img1);
               }
               if(time == 3){
                   GreenfootImage img = new GreenfootImage (100, 30);
                   img.drawString ("8", 2, 20);
                   setImage(img);
               }
               if(time == 4){
                   GreenfootImage img = new GreenfootImage (100, 30);
                   img.drawString ("7", 2, 20);
                   setImage(img);
               }
               if(time == 5){
                   GreenfootImage img = new GreenfootImage (100, 30);
                   img.drawString ("6", 2, 20);
                   setImage(img);
               }
               if(time == 6){
                   GreenfootImage img = new GreenfootImage (100, 30);
                   img.drawString ("5", 2, 20);
                   setImage(img);
               }
               if(time == 7){
                   GreenfootImage img = new GreenfootImage (100, 30);
                   img.drawString ("4", 2, 20);
                   setImage(img);
               }
                if(time == 8){
                   GreenfootImage img = new GreenfootImage (100, 30);
                   img.drawString ("3", 2, 20);
                   setImage(img);
               }
               if(time == 9){
                   GreenfootImage img = new GreenfootImage (100, 30);
                   img.drawString ("2", 2, 20);
                   setImage(img);
               }
               if(time == 10){
               }
            }
        }
    }
    


    It starts showing the counter at 2.. and it skips 9.. any help on that?

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

Optimizer1 hasn't added any friends yet.

Comments

Optimizer1 has no profile comments yet. Why not say hello?