You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
113 lines
10 KiB
113 lines
10 KiB
import User from "../../FrameWork/User/User"
|
|
import LevelUpManager from "./LevelUpManager"
|
|
|
|
|
|
|
|
|
|
//富豪 posiArray:[200, -143], spineAttack:['待机', '攻击'],
|
|
//男主 spineAttack:['待机', '攻击1','攻击2','攻击3' ],
|
|
let challengeConfig = [
|
|
{challengeId:0,spineName:'龙哥', headUrl:'challenge/head/街头龙哥', spineUrl:'Spine/challenge/龙哥', posiArray:[200, -102],spineAttack:['待机', '攻击'],booldNum:400000, name:'龙哥',iconUrl:'challenge/街头龙哥', attackNum:8000, moneyReward:50000},
|
|
// {challengeId:1,spineName:'卖菜大妈',headUrl:'challenge/head/卖菜大妈',spineUrl:'Spine/challenge/卖菜大妈', posiArray:[186, -206],spineAttack:['待机', '攻击'],booldNum:400000, name:'卖菜大妈', iconUrl:'challenge/卖菜大妈', attackNum:5000, moneyReward:4800000000000000000000000000000000000},
|
|
// {challengeId:2,spineName:'洛天行',headUrl:'challenge/head/洛天行',spineUrl:'Spine/challenge/洛天行', posiArray:[200, -143],spineAttack:['待机', '攻击'],booldNum:800000, name:'洛天行', iconUrl:'challenge/洛天行', attackNum:10000, moneyReward:75000000},
|
|
// {challengeId:3,spineName:'洛北辰',headUrl:'challenge/head/洛北辰',spineUrl:'Spine/challenge/洛北辰魔化', posiArray:[200, -80],spineAttack:['待机', '攻击'],booldNum:1600000, name:'洛北辰', iconUrl:'challenge/洛北辰', attackNum:20000 , moneyReward:850000},
|
|
|
|
{challengeId:3,spineName:'华强',headUrl:'challenge/head/华强哥',spineUrl:'Spine/challenge/华强',posiArray:[200, -143], spineAttack:['待机', '攻击'],booldNum:4800000, name:'华强哥', iconUrl:'challenge/华强哥', attackNum:200000, moneyReward:8000000},
|
|
{challengeId:4,spineName:'护卫',headUrl:'challenge/head/护卫',spineUrl:'Spine/challenge/护卫', posiArray:[200, -105],spineAttack:['待机', '攻击'],booldNum:64000000, name:'暗月守卫', iconUrl:'challenge/护卫', attackNum:800000, moneyReward:65000000000},
|
|
{challengeId:5,spineName:'暗月长老',headUrl:'challenge/head/暗卫长老',spineUrl:'Spine/challenge/暗月长老', posiArray:[200, -108],spineAttack:['待机', '攻击'],booldNum:240000000, name:'暗月长老', iconUrl:'challenge/暗卫长老', attackNum:3000000, moneyReward:240000000},
|
|
{challengeId:6,spineName:'第七章挑战',headUrl:'challenge/head/洛北辰',spineUrl:'Spine/challenge/柳家豪_1', posiArray:[200, -80],spineAttack:['待机', '攻击'],booldNum:160000000, name:'柳家豪', iconUrl:'challenge/洛北辰', attackNum:50000000 , moneyReward:160000000},
|
|
{challengeId:7,spineName:'电瓶哥',headUrl:'challenge/head/偷电瓶',spineUrl:'Spine/challenge/电瓶哥', posiArray:[165, -192],spineAttack:['待机', '战斗', '特效'],booldNum:24000000000, name:'电瓶哥', iconUrl:'challenge/偷电瓶', attackNum:300000000, moneyReward:24000000000},
|
|
{challengeId:8,spineName:'噬魂怪',headUrl:'challenge/head/噬魂兽',spineUrl:'Spine/challenge/噬魂怪', posiArray:[200, -348],spineAttack:['待机', '攻击'],booldNum:320000000000, name:'噬魂兽', iconUrl:'challenge/噬魂兽', attackNum:4000000000, moneyReward:320000000000},
|
|
{challengeId:9,spineName:'暗月右使',headUrl:'challenge/head/暗卫右使',spineUrl:'Spine/challenge/暗月右使', posiArray:[200, -52],spineAttack:['待机', '攻击'],booldNum:800000000000, name:'暗卫右使(江啸天)', iconUrl:'challenge/暗卫右使', attackNum:10000000000, moneyReward:800000000000},
|
|
{challengeId:10,spineName:'李佳奇',headUrl:'challenge/head/眉笔哥',spineUrl:'Spine/challenge/李佳奇', posiArray:[200, -108],spineAttack:['待机', '攻击'],booldNum:8000000000000, name:'眉笔哥', iconUrl:'challenge/眉笔哥', attackNum:100000000000, moneyReward:8000000000000},
|
|
{challengeId:11,spineName:'研究所护卫',headUrl:'challenge/head/研究所护卫',spineUrl:'Spine/challenge/研究所护卫', posiArray:[276, -176],spineAttack:['待机', '攻击'],booldNum:6400000000000, name:'研究所护卫', iconUrl:'challenge/研究所护卫', attackNum:500000000000, moneyReward:6400000000000, goodId:1709},
|
|
{challengeId:12,spineName:'冻鱼强',headUrl:'challenge/head/冻鱼强',spineUrl:'Spine/challenge/冻鱼强', posiArray:[225, -69],spineAttack:['待机', '攻击'],booldNum:7000000000000, name:'冻鱼强', iconUrl:'challenge/冻鱼强', attackNum:800000000000, moneyReward:7000000000000},
|
|
{challengeId:13,spineName:'严久狂',headUrl:'challenge/head/严久狂',spineUrl:'Spine/challenge/严久狂', posiArray:[186, -90],spineAttack:['待机', '攻击'],booldNum:8000000000000, name:'严久狂', iconUrl:'challenge/严久狂', attackNum:1000000000000, moneyReward:8000000000000},
|
|
{challengeId:14,spineName:'巨无霸',headUrl:'challenge/head/巨无霸',spineUrl:'Spine/challenge/巨无霸', posiArray:[122, -317],spineAttack:['待机', '攻击'],booldNum:9000000000000, name:'巨无霸', iconUrl:'challenge/巨无霸', attackNum:2000000000000, moneyReward:9000000000000},
|
|
{challengeId:15,spineName:'富豪',headUrl:'challenge/head/钱多发',spineUrl:'Spine/challenge/富豪', posiArray:[182, -146],spineAttack:['待机', '攻击'],booldNum:7200000000000000000, name:'钱多发', iconUrl:'challenge/钱多发', attackNum:9000000000000000 , moneyReward:720000000000000000},
|
|
{challengeId:16,spineName:'洪七公',headUrl:'challenge/head/洪七公',spineUrl:'Spine/challenge/洪七公', posiArray:[177, -157],spineAttack:['待机', '攻击'],booldNum:7200000000000000000, name:'洪七公', iconUrl:'challenge/洪七公', attackNum:9000000000000000 , moneyReward:720000000000000000},
|
|
{challengeId:17,spineName:'研究所所长',headUrl:'challenge/head/研究所所长',spineUrl:'Spine/challenge/研究所所长', posiArray:[159, -155],spineAttack:['待机', '攻击'],booldNum:7200000000000000000 , name:'研究所所长', iconUrl:'challenge/研究所所长', attackNum:9000000000000000 , moneyReward:720000000000000000},
|
|
{challengeId:18,spineName:'卧龙',headUrl:'challenge/head/卧龙',spineUrl:'Spine/challenge/卧龙', posiArray:[161, -176],spineAttack:['待机', '攻击'],booldNum:720000000000000000, name:'卧龙', iconUrl:'challenge/卧龙', attackNum:9000000000000000, moneyReward:720000000000000000},
|
|
{challengeId:19,spineName:'龙镇南',headUrl:'challenge/head/龙镇南',spineUrl:'Spine/challenge/龙镇南', posiArray:[168, -110],spineAttack:['待机', '攻击'],booldNum:7200000000000000000, name:'龙镇南', iconUrl:'challenge/龙镇南', attackNum:9000000000000000, moneyReward:720000000000000000},
|
|
{challengeId:20,spineName:'马保国',headUrl:'challenge/head/马大师',spineUrl:'Spine/challenge/马保国', posiArray:[200, -143],spineAttack:['待机', '攻击'],booldNum:72000000000000000000, name:'马大师', iconUrl:'challenge/马大师', attackNum:20000000000000000000, moneyReward:72000000000000000000},
|
|
{challengeId:21,spineName:'申梓',headUrl:'challenge/head/申梓',spineUrl:'Spine/challenge/申梓', posiArray:[177, -157],spineAttack:['待机', '攻击'],booldNum:720000000000000000, name:'申梓', iconUrl:'challenge/申梓', attackNum:90000000000000000000 , moneyReward:720000000000000000000},
|
|
{challengeId:22,spineName:'拼嘻嘻',headUrl:'challenge/head/拼夕夕',spineUrl:'Spine/challenge/拼嘻嘻', posiArray:[200, -143],spineAttack:['待机', '攻击'],booldNum:7200000000000000000000, name:'拼夕夕', iconUrl:'challenge/拼夕夕', attackNum:900000000000000000000, moneyReward:7200000000000000000000},
|
|
{challengeId:23,spineName:'洛北辰魔化',headUrl:'challenge/head/魔化洛北辰',spineUrl:'Spine/challenge/洛北辰魔化', posiArray:[200, -52],spineAttack:['待机', '攻击'],booldNum:72000000000000000000000, name:'魔化洛北辰', iconUrl:'challenge/魔化洛北辰', attackNum:9000000000000000000000, moneyReward:72000000000000000000000},
|
|
{challengeId:24,spineName:'渣渣辉',headUrl:'challenge/head/渣渣灰',spineUrl:'Spine/challenge/渣渣辉', posiArray:[132, -140],spineAttack:['待机', '攻击'],booldNum:720000000000000000000000, name:'渣渣灰', iconUrl:'challenge/渣渣灰', attackNum:90000000000000000000000, moneyReward:720000000000000000000000},
|
|
{challengeId:25,spineName:'妹妹',headUrl:'challenge/head/魔',spineUrl:'Spine/challenge/妹妹', posiArray:[175, -45],spineAttack:['待机', '攻击'],booldNum:7200000000000000000000000 , name:'魔', iconUrl:'challenge/魔', attackNum:900000000000000000000000, moneyReward:7200000000000000000000000},
|
|
{challengeId:26,spineName:'洛夕颜',headUrl:'challenge/head/神',spineUrl:'Spine/challenge/洛夕颜', posiArray:[200, -135],spineAttack:['待机', '攻击'],booldNum:72000000000000000000000000, name:'神', iconUrl:'challenge/神', attackNum:9000000000000000000000000, moneyReward:720000000000000000000000000},
|
|
|
|
]
|
|
|
|
export default class ChallengeManager{
|
|
|
|
|
|
public static getManagerConfigs(){
|
|
return challengeConfig
|
|
}
|
|
|
|
public static setChallengeID(){
|
|
let curId = User.getCurChallengeId()
|
|
if(curId == 1 || curId == 2){
|
|
curId = 3
|
|
}
|
|
let nextId = curId+1
|
|
|
|
if(nextId>=26){
|
|
nextId = 26
|
|
}
|
|
User.setCurChallengeId(nextId)
|
|
//return challengeConfig
|
|
}
|
|
|
|
public static getCurChallengeId(){
|
|
let curId = User.getCurChallengeId()
|
|
if(curId == 1 || curId == 2){
|
|
curId = 3
|
|
}
|
|
|
|
return curId
|
|
}
|
|
|
|
public static getCurChallengeConfigDate(){
|
|
let curId = User.getCurChallengeId()
|
|
if(curId == 1 || curId == 2){
|
|
curId = 3
|
|
}
|
|
|
|
for(let i = 0;i<challengeConfig.length;i++){
|
|
if(challengeConfig[i].challengeId == curId){
|
|
return challengeConfig[i]
|
|
}
|
|
}
|
|
return null
|
|
}
|
|
|
|
public static getCurChallengeConfigDateById(id){
|
|
|
|
for(let i = 0;i<challengeConfig.length;i++){
|
|
if(challengeConfig[i].challengeId == id){
|
|
return challengeConfig[i]
|
|
}
|
|
}
|
|
return null
|
|
}
|
|
|
|
|
|
|
|
public static canChallengeProple(){
|
|
let isCan = false
|
|
let config = this.getCurChallengeConfigDate()
|
|
let clickIncome = LevelUpManager.getCurClickIncome()
|
|
if(config){
|
|
if(clickIncome > config.attackNum){
|
|
isCan = true
|
|
}
|
|
}else{
|
|
isCan = false
|
|
}
|
|
|
|
return isCan
|
|
}
|
|
// update (dt) {}
|
|
}
|
|
|