1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import DataModel from "../../engines/models/DataModel"
- import GamePropertys from "./GamePropertys";
- export default class GameModel extends DataModel
- {
- /**
- * 冲刺开始时间
- */
- lastSprintTime:number=0;
- /**
- * 当前使用的车ID
- */
- currentCarId:number;
- constructor(){
- super();
- }
- SetDefaultPropertys():void{
- this.currentLevel=1;
- }
- protected OnReadByLocal(data:any):void{
-
- }
- protected OnSaveToLocal(data:any):void{
-
- }
- /**
- * 当前关卡
- */
- get currentLevel():number{
- return this.GetProperty(GamePropertys.currentLevel);
- }
-
- set currentLevel(value:number){
- this.SetProperty(GamePropertys.currentLevel,value);
- }
- private static __instance:GameModel;
- public static get single():GameModel{
- if(this.__instance==null){
- this.__instance=new GameModel();
- }
- return this.__instance;
- }
- }
|