<b>REGISTER</b>

GFX-Sector - Andere Programmiersprachen


 
GFX-Sector » Coding Area » Andere Programmiersprachen » Doodle Jump » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Recommend to a Friend | Add Thread to Favorites

Andere Programmiersprachen

Alles über die anderen Programmiersprachen wie C++, C#, Visual Basic, Java, Ajax und allen anderen Programmiersprachen bitte hier rein.
Post New Thread Post Reply

Doodle Jump

     Deutsche Version  English version
Author
Post « Previous Thread | Next Thread »

WIG WIG is a male
Scharfzeichner


Avatar von WIG

Registration Date: 19.04.2007
Posts: 141
Program: Adobe Photoshop CS4
Deviantart: WIG6

Spacer
Doodle Jump

Doodle Jump

      

Hallo zusammen,

also ich habe ein kleines Problem ich Programmiere derzeit mit Eclipse, Doodle Jump für die Schule leider kriege ich es einfach nicht hin die Ebenen zu Programmieren auf die er drauf springen soll und sich dann von denen wieder abstoßen soll. Unter //Ebenen hab ich schon mal einen Ansatz gemacht wie ich es Probiert habe.
Könnte mir bitte jemand etwas helfen.


code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
class Projekt1 extends JavaApp
{
    int Start;
    int Optionen;
    int Beenden;
    int Zurück;
    int Bild_y = -210;
    int Bild_x = 0 ;
    int richtung = 10;
    double Spielfigur;
    double bild;
    int[][]horizontale_linien = new int[3][3];

    public static void main(String[] args)
    {
        new Projekt1();
    }

    void whenProgramStarts()
    {
        addDrawingPlane();
        addDrawingPlane();
        addDrawingPlane();
        addDrawingPlane();
        addDrawingPlane();

        //Außen_Rahmen
        setColorRGB(0, 141, 182, 252);
        drawFilledRectangle(0, 0, 0, 500, 500);
        drawRectangle(1, 0, 0, 500, 500);

        //Überschrift
        setFontsize(2, 40);
        drawStringCentered(2, "Doodle Jump", 0, 220);
        setFontsize(2, 30);
        drawString(2, "kopie", 15, 170);

        //Buttons
        Start = guiAddButton("START", "Spiel starten", -70, 80, 200, 50, true);
        Optionen = guiAddButton("OPTIONEN", "Optionen", -50, 0, 200, 50, true);
        Beenden = guiAddButton("BEENDEN", "Beenden", -30, -80, 200, 50, true);
        Zurück = guiAddButton("ZURÜCK", "Zurück", -30, -80, 200, 50, true);
    }

    void whenButtonSTARTIsClicked()
    {
        clearDrawingPlane(2);
        clearDrawingPlane(0);
        
        setColorRGB(2, 250, 250, 210);
        drawFilledRectangle(2, 0, 0, 500, 500);
        drawRectangle(3, 0, 0, 500, 500);
        
        guiSetVisible(Start, false);
        guiSetVisible(Optionen, false);
        guiSetVisible(Beenden, false);
        guiSetVisible(Zurück, false);
        
        bild=registerImage("Yeti.png",0.18);

        //Bild_wird_gezeischnet
        drawImage(4, 0, Bild_x, Bild_y);
        startTimer("Spielfigur", 30, true);
        
        //Ebenen
        
        //Erste
        horizontale_linien[0][0] = -200;
        horizontale_linien[0][1] = 10;
        horizontale_linien[0][2] = 50;
        
        drawLine(5, horizontale_linien[0][1], horizontale_linien[0][0], horizontale_linien[0][2], horizontale_linien[0][0]);
        drawLine(5, horizontale_linien[1][1], horizontale_linien[1][0], horizontale_linien[1][2], horizontale_linien[1][0]);
        drawLine(5, horizontale_linien[2][1], horizontale_linien[2][0], horizontale_linien[2][2], horizontale_linien[2][0]);
    }

    void whenButtonOPTIONENIsClicked()
    {
        guiSetVisible(Start, false);
        guiSetVisible(Optionen, false);
        guiSetVisible(Beenden, false);
    }

    void whenButtonBEENDENIsClicked()
    {
        exitProgram();
    }

    void whenButtonZURÜCKIsClicked()
    {
        guiSetVisible(Start, true);
        guiSetVisible(Optionen, true);
        guiSetVisible(Beenden, true);
    }

    //Spiel
    void whenTimerSpielfigurRunsOut()
    {
        Bild_y=Bild_y+richtung;
        if (Bild_y == -100)
        {
            richtung = -richtung;
        }
        if (Bild_y == -210)
        {
            richtung = -richtung;
        }
        clearDrawingPlane(4);
        drawImage(4, 0, Bild_x, Bild_y);
    }

    void whenKeyRIGHTIsPressed()
    {
        startTimer ("RIGHT", 100, true);
    }
    
    void whenKeyRIGHTIsReleased()
    {
        stopTimer("RIGHT");    
    }

    void whenTimerRIGHTRunsOut ()
    {
        Bild_x=Bild_x+10 ;
        if (Bild_x==250)
        {
        Bild_x=-250;
        }
    }

    void whenKeyLEFTIsPressed()
    {
        startTimer ("LEFT", 100, true);
    }
    
    void whenKeyLEFTIsReleased()
    {
        stopTimer("LEFT");     
    }

    void whenTimerLEFTRunsOut ()
    {
        Bild_x=Bild_x-10 ;
        if (Bild_x<=-250)
        {
        Bild_x=250;
    }
    }
}


Neustes Werk



Doodle Jump 12.01.2012 23:13 WIG is offline Search for Posts by WIG
 
Spacer
   
GFX-Sector
unregistered


 hat kein Avatar


Spacer

Have you enjoyed this topic?


If you were enjoying this post and if you keen on reading more interesting stuff then do not hesitate to complete the free sign up.

After the free registration you will gain access to all areas and you will be able to communicate with other artists from all over the world.

In addition you will benefit from our Photoshop and coding section as well as from our huge (hundreds of gigabytes) free resource section where you can find everything you will need to be a successful (web) designer/artist.

Sign up now and enjoy the advantages as a registered member.

(This website will be ad-free after a complete free sign up.)

New Post 12.01.2012 23:13  
Tree Structure | Board Structure
Post New Thread Post Reply
GFX-Sector » Coding Area » Andere Programmiersprachen » Doodle Jump

Similar topics to Doodle Jump
Thread
Killuah vs. JumpGFX (Forum: 1on1-Archiv)
Hidden in the Mountains | JumpGFX (Forum: Artworks)
Doodle 4 Google! (Forum: Allgemeine Diskussion)
High Jump Tag Tutorial. (Forum: Tutorial-Archiv)
[Anime] lifes like a jump rope (Forum: Signaturen/Avatare)