-
Notifications
You must be signed in to change notification settings - Fork 1
/
Story0.java
62 lines (55 loc) · 2.03 KB
/
Story0.java
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
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Story0 here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Story0 extends Story
{
GreenfootImage head = new GreenfootImage("長老", TEXT_SIZE, white, transport, rightGray);
GreenfootImage oruga = new GreenfootImage("オルガ", TEXT_SIZE, white, transport, rightGray);
DisplayCharacter orugaImg = new DisplayCharacter(new GreenfootImage("./images/inStory/cater.png"));
DisplayCharacter headImg = new DisplayCharacter(new GreenfootImage("./images/inStory/choro.png"));
public Story0(){
super(0, MyWorld.title);
}
@Override
public void act() {
if(isFirst){
isFirst = false;
MyWorld.usingStory = new Story1();
}
checkInput(MyWorld.usingStory);
progress();
exitThis(MyWorld.usingStory);
if(flameCount == 1 && !stopLine){
switch(lineCount){
case 17:
addObject(headImg, 4 * MyWorld.WINDOW_SIZE/5- 50, MyWorld.WINDOW_SIZE/2);
setName(head);
break;
case 20:
headImg.img.setTransparency(125);
addObject(orugaImg, MyWorld.WINDOW_SIZE/5, MyWorld.WINDOW_SIZE/2);
setName(oruga);
break;
case 21:
headImg.img.setTransparency(255);
orugaImg.img.setTransparency(125);
setName(head);
break;
case 22:
headImg.img.setTransparency(125);
orugaImg.img.setTransparency(255);
setName(oruga);
break;
case 25:
headImg.img.setTransparency(255);
orugaImg.img.setTransparency(125);
setName(head);
break;
}
}
}
}