Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
update
  • Loading branch information
cping committed Jun 1, 2019
1 parent 6aa6f67 commit b4d18db
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ public FadeSpiralEffect(int type, int speed, LColor c) {
public FadeSpiralEffect(int type, int speed, LColor c, int w, int h) {
this.type = type;
this.speed = speed;
this.setColor(c);
this.timer = new LTimer(30);
this.setSize(w, h);
this.tilewidth = (int) (LSystem.viewSize.getWidth() / w + 1);
this.tileheight = (int) (LSystem.viewSize.getHeight() / h + 1);
this.conversions = new boolean[tilewidth][tileheight];
this.reset();
this.setRepaint(true);
this.setColor(c);
this.setSize(w, h);
}

@Override
Expand All @@ -90,10 +90,10 @@ public void reset() {
}
}
}
state = 1;
cx = 0;
cy = 0;
tilescovered = 0;
this.state = 1;
this.cx = 0;
this.cy = 0;
this.tilescovered = 0;
_baseColor.setColor(tmp);
}

Expand Down
Binary file modified Java/loon-core-0.5-source.jar
Binary file not shown.
Binary file modified Java/loon-core-0.5.jar
Binary file not shown.
Binary file modified Java/samples/BaseSample(executable).jar
Binary file not shown.
9 changes: 9 additions & 0 deletions Java/samples/org/test/CollisionWorldTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import loon.Stage;
import loon.action.ActionBind;
import loon.action.ActionListener;
import loon.action.FollowTo;
import loon.action.MoveTo;
import loon.action.collision.CollisionWorld;
import loon.action.map.Field2D;
Expand Down Expand Up @@ -60,6 +61,14 @@ public void create() {
world.add(new Entity("ball.png", 66, 66));
world.add(new Entity("ball.png", 266, 166));
world.add(new Entity("ball.png", 155, 100));

Entity follow = new Entity("ball.png", 266, 266);
FollowTo followeve = new FollowTo(hero);
followeve.setCollisionWorld(world);
//跟随hero
follow.selfAction().event(followeve).start();

world.add(follow);

up(new Touched() {

Expand Down
17 changes: 10 additions & 7 deletions Java/samples/org/test/EffectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import loon.action.sprite.effect.FadeOvalEffect;
import loon.action.sprite.effect.FadeSpiralEffect;
import loon.action.sprite.effect.FadeTileEffect;
import loon.action.sprite.effect.PixelBubbleEffect;
import loon.action.sprite.effect.SwipeEffect;
import loon.canvas.LColor;
import loon.component.LLabel;
Expand All @@ -19,7 +20,7 @@ public class EffectTest extends Stage {

@Override
public void create() {

final Array<BaseEffect> effects = new Array<BaseEffect>();

// 设置背景图片
Expand Down Expand Up @@ -57,16 +58,18 @@ public void run(LTimerContext time) {
kill();
LLabel label = addLabel("Effect Over");
centerOn(label);

// 显示一堆红色气泡出来
add(new PixelBubbleEffect(LColor.red));

}
}
};
// 加入一个单独的游戏进程
addProcess(process);
//Screen关闭时注销进程,注销effct集合
putReleases(process,effects);
add(MultiScreenTest.getBackButton(this,0));

// Screen关闭时注销进程,注销effct集合
putReleases(process, effects);

add(MultiScreenTest.getBackButton(this, 0));
}
}
Binary file modified Loon-Build/javase-game-sample/libs/loon-core-0.5.jar
Binary file not shown.
Binary file modified loon-gradle-template.7z
Binary file not shown.

0 comments on commit b4d18db

Please sign in to comment.