[client] set FPS to 60
This commit is contained in:
@@ -140,9 +140,9 @@ module.exports.default = gulp.series(
|
|||||||
module.exports['client:linux:deb'],
|
module.exports['client:linux:deb'],
|
||||||
//module.exports['client:android:build'],
|
//module.exports['client:android:build'],
|
||||||
|
|
||||||
/*module.exports['editor:flash:build'],
|
module.exports['editor:flash:build'],
|
||||||
module.exports['editor:flash:html'],
|
module.exports['editor:flash:html'],
|
||||||
module.exports['editor:html5:build'],*/
|
module.exports['editor:html5:build'],
|
||||||
|
|
||||||
//module.exports['server:neko:build'],
|
//module.exports['server:neko:build'],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "tankz",
|
"name": "tankz",
|
||||||
"version": "0.11.0",
|
"version": "0.11.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"dateformat": "^3.0.3",
|
"dateformat": "^3.0.3",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "^4.0.0",
|
||||||
"gulp-add": "0.0.2",
|
"gulp-add": "0.0.2",
|
||||||
"gulp-clean": "^0.4.0",
|
"gulp-clean": "^0.4.0",
|
||||||
"gulp-haxetool": "^0.0.17"
|
"gulp-haxetool": "^0.0.19"
|
||||||
},
|
},
|
||||||
"haxeDependencies": {
|
"haxeDependencies": {
|
||||||
"haxework": "git@bitbucket.org:shmyga/haxework.git",
|
"haxework": "git@bitbucket.org:shmyga/haxework.git",
|
||||||
"lime": "7.3.0",
|
"lime": "7.5.0",
|
||||||
"openfl": "8.9.0",
|
"openfl": "8.9.1",
|
||||||
"hxcpp": "4.0.8",
|
"hxcpp": "4.0.8",
|
||||||
"promhx": "1.1.0",
|
"promhx": "1.1.0",
|
||||||
"protohx": "0.4.6",
|
"protohx": "0.4.6",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package ru.m.tankz;
|
package ru.m.tankz;
|
||||||
|
|
||||||
|
import openfl.display.FPS;
|
||||||
import ru.m.tankz.view.ClientView;
|
import ru.m.tankz.view.ClientView;
|
||||||
import flash.Lib;
|
import flash.Lib;
|
||||||
import haxework.animate.Animate;
|
import haxework.animate.Animate;
|
||||||
@@ -32,5 +33,10 @@ class Client {
|
|||||||
var view:ClientView = new ClientView();
|
var view:ClientView = new ClientView();
|
||||||
Root.bind(view);
|
Root.bind(view);
|
||||||
view.launch();
|
view.launch();
|
||||||
|
|
||||||
|
#if debug
|
||||||
|
var fps = new FPS(0, 0, 0x00ff00);
|
||||||
|
view.content.addChild(fps);
|
||||||
|
#end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ import ru.m.tankz.Type;
|
|||||||
class BonusRenderItem extends BitmapRenderItem {
|
class BonusRenderItem extends BitmapRenderItem {
|
||||||
|
|
||||||
public var type(default, set):BonusType;
|
public var type(default, set):BonusType;
|
||||||
private var d = 0.1;
|
private var d = -0.05;
|
||||||
|
private var alpha = 1.0;
|
||||||
|
|
||||||
public function new(rect:Rectangle, type:BonusType) {
|
public function new(rect:Rectangle, type:BonusType) {
|
||||||
super(rect);
|
super(rect);
|
||||||
@@ -24,8 +25,9 @@ class BonusRenderItem extends BitmapRenderItem {
|
|||||||
|
|
||||||
override public function update():Void {
|
override public function update():Void {
|
||||||
super.update();
|
super.update();
|
||||||
view.alpha += d;
|
alpha += d;
|
||||||
if (view.alpha < 0 || view.alpha > 1.5) {
|
view.alpha = alpha;
|
||||||
|
if (alpha <= 0 || alpha >= 1.5) {
|
||||||
d = -d;
|
d = -d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,10 +55,7 @@ class TankRenderItem extends BitmapRenderItem {
|
|||||||
if (!color1.zero) {
|
if (!color1.zero) {
|
||||||
image2 = BitmapUtil.colorize(image2, color2);
|
image2 = BitmapUtil.colorize(image2, color2);
|
||||||
}
|
}
|
||||||
images = [
|
images = [for (i in 0...6) image1].concat([for (i in 0...6) image2]);
|
||||||
image1, image1, image1,
|
|
||||||
image2, image2, image2,
|
|
||||||
];
|
|
||||||
frame = 0;
|
frame = 0;
|
||||||
bitmap.bitmapData = images[frame];
|
bitmap.bitmapData = images[frame];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ class GameRunner implements EngineListener implements GameListener {
|
|||||||
}
|
}
|
||||||
gameEventSignal.emit(EventUtil.buildBricksSpawn(game.engine.map));
|
gameEventSignal.emit(EventUtil.buildBricksSpawn(game.engine.map));
|
||||||
gameEventSignal.emit(GameEvent.START(state));
|
gameEventSignal.emit(GameEvent.START(state));
|
||||||
|
for (i in 0...10) spawnBonus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function next():Option<GameState> {
|
public function next():Option<GameState> {
|
||||||
|
|||||||
Reference in New Issue
Block a user