Commit a5dfe921 authored by huangwenjie's avatar huangwenjie

playscene

parent 7a1e1360
This diff is collapsed.
......@@ -4,6 +4,10 @@
"keys": "comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png",
"name": "common"
},
{
"keys": "bombBtn.png,ele1024.png,ele128.png,ele16.png,ele2.png,ele2048.png,ele256.png,ele32.png,ele4.png,ele512.png,ele64.png,ele8.png,exchangeBtn.png,filterBtn.png,playBg.png",
"name": "playScene"
},
{
"keys": "snake.png,startBtn.png",
"name": "startScene"
......
......@@ -8,7 +8,7 @@ import { layers } from "../module/views/layers";
import { RES } from "../module/RES";
import { changeScene, showWaiting, hideWaiting, showToast } from "../module/ctrls";
import { StartScene } from "./scenes/StartScene";
import { PlayScene } from "./scenes/PlayScene";
import { PlayScene } from "./scenes/playScene/PlayScene";
import { sendTbNet, TbNetName, getTbData } from "./TaoBaoNet";
......
import { Scene } from "../../module/views/Scene";
export class PlayScene extends Scene {
get groupNames() { return ["playScene"] }
destroy() {
super.destroy();
}
}
import { Sprite } from "../../../engine/2d/display";
import { RES } from "../../../module/RES";
import { Texture } from "../../../engine/2d/texture";
export class GameEle extends Sprite {
_eleType = ""
get eleType() { return this._eleType }
set eleType(type) { this._eleType = type }
constructor(eleType) {
super()
this._eleType = eleType
switch (eleType + "") {
case "2":
this.texture = RES.getRes("ele2.png")
this.x = 5
this.y = -5
break
case "4":
this.texture = RES.getRes("ele4.png")
this.x = -10
this.y = -5
break
case "8":
this.texture = RES.getRes("ele8.png")
this.y = -5
break
case "16":
this.texture = RES.getRes("ele16.png")
this.x = 5
this.y = -15
break
case "32":
this.texture = RES.getRes("ele32.png")
this.y = -10
break
case "64":
this.texture = RES.getRes("ele64.png")
this.y = -15
break
case "128":
this.texture = RES.getRes("ele128.png")
this.x = 5
this.y = -10
break
case "256":
this.texture = RES.getRes("ele256.png")
this.x = 5
this.y = -10
break
case "512":
this.texture = RES.getRes("ele512.png")
this.x = 5
this.y = -10
break
case "1024":
this.texture = RES.getRes("ele1024.png")
this.x = 10
this.y = -10
break
case "2048":
this.texture = RES.getRes("ele2048.png")
this.x = 5
this.y = -10
break
default:
this.texture = Texture.EMPTY
break
}
}
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment