-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b46476
commit 91999c9
Showing
5 changed files
with
77 additions
and
10 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.hhs.xgn.stg.game; | ||
|
||
import com.hhs.xgn.gdx.util.VU; | ||
import com.hhs.xgn.stg.launcher.MainScreen; | ||
import com.hhs.xgn.stg.type.EntityEnemyBullet; | ||
import com.hhs.xgn.stg.type.SpellCard; | ||
|
||
public class MovingNonSpell extends SpellCard { | ||
public MovingNonSpell(MainScreen ms){ | ||
super(ms,1000,1000,"",false); | ||
} | ||
|
||
int frameC=0; | ||
boolean left=true; //currently going left | ||
|
||
@Override | ||
public void onFrame() { | ||
frameC++; | ||
|
||
if(frameC<=200){ | ||
return; | ||
} | ||
|
||
if(frameC%180==0){ | ||
left=!left; | ||
} | ||
|
||
if(frameC%5==0){ | ||
SelfAimBullet sab=new SelfAimBullet(obj, 60, getX(), getY()); | ||
obj.addEnemyBullet(sab); | ||
} | ||
|
||
if(left){ | ||
obj.boss.x--; | ||
}else{ | ||
obj.boss.x++; | ||
} | ||
super.onFrame(); | ||
} | ||
|
||
@Override | ||
public void onEnd(){ | ||
obj.addItem(new ItemPower(obj, obj.boss.x, obj.boss.y, 5)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters