-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathspaceDodgeAndroid.pde
More file actions
59 lines (49 loc) · 1.14 KB
/
spaceDodgeAndroid.pde
File metadata and controls
59 lines (49 loc) · 1.14 KB
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
// Copyright (C) 2018 Dylan Neve <dylanneve1@gmail.com>
import java.io.File;
import android.app.Activity;
import android.content.Context;
import android.os.Vibrator;
import android.os.Bundle;
import cassette.audiofiles.SoundFile;
import android.view.MotionEvent;
import android.view.WindowManager;
import android.view.*;
SoundFile bang;
SoundFile powerUp;
Activity act;
handler h;
Menus m;
Player p;
Troid[] troid = new Troid[10];
Life[] life = new Life[1];
PImage nebula;
PImage ship;
PImage asteriod;
void setup() {
//Init sound
powerUp = new SoundFile(this, "media/power.mp3");
bang = new SoundFile(this, "media/bang.mp3");
//Init pictures
nebula = loadImage("images/back.jpg");
ship = loadImage("images/ship.jpg");
asteriod = loadImage("images/asteroid.jpg");
//Misc setup
orientation(PORTRAIT);
fullScreen();
frameRate(120);
//Other
h = new handler();
m = new Menus();
p = new Player();
for (int i = 0; i < troid.length; i++) {
troid[i] = new Troid();
}
for (int i = 0; i < life.length; i++) {
life[i] = new Life();
}
act = this.getActivity();
}
void draw() {
// Call different menus.
m.call();
}