i
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { DEV } from 'cc/env'
|
||||
|
||||
export default {
|
||||
url: () => (DEV ? 'https://fish.wanzhuanyongcheng.cn' : 'https://fish.jdt168.com'),
|
||||
wsUrl: () => (DEV ? 'fish.wanzhuanyongcheng.cn' : 'fish.jdt168.com'),
|
||||
}
|
||||
import { DEV } from 'cc/env'
|
||||
|
||||
export default {
|
||||
url: () => (DEV ? 'https://fish.wanzhuanyongcheng.cn' : 'https://fish.jdt168.com'),
|
||||
wsUrl: () => (DEV ? 'fish.wanzhuanyongcheng.cn' : 'fish.jdt168.com'),
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "f01978bd-5d14-49a6-bea7-4b7ad0c82b7b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "f01978bd-5d14-49a6-bea7-4b7ad0c82b7b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
|
||||
@@ -1,86 +1,86 @@
|
||||
import { FishInfo } from './FishInfo'
|
||||
import config from './Config'
|
||||
export class FishConfig {
|
||||
public static config: Array<FishInfo> = [
|
||||
// new FishInfo(1, '蝴蝶鱼', 2, 2),
|
||||
// new FishInfo(2, '鲶鱼', 2, 1),
|
||||
// new FishInfo(3, '狮子鱼', 2, 2),
|
||||
// new FishInfo(4, '条纹鱼', 2, 2),
|
||||
// new FishInfo(5, '沙丁鱼', 2, 2),
|
||||
// new FishInfo(6, '石斑鱼', 2, 2),
|
||||
// new FishInfo(7, '河豚', 3, 1.2),
|
||||
// new FishInfo(8, '海螺', 3, 2),
|
||||
// new FishInfo(9, '接吻鱼', 3, 1.2),
|
||||
// new FishInfo(10, '海姆', 4, 1),
|
||||
// new FishInfo(11, '绿鳍鱼', 4, 1.2),
|
||||
// new FishInfo(12, '鲎', 4, 1.2),
|
||||
// new FishInfo(13, '魔鬼鱼', 5, 0.6),
|
||||
// new FishInfo(14, '小海龟', 5, 2),
|
||||
// new FishInfo(15, '锤头鲨', 6, 0.5),
|
||||
// new FishInfo(16, '金枪鱼', 6, 0.5),
|
||||
// new FishInfo(17, '大三元', 6, 0.5),
|
||||
// new FishInfo(18, '黄金鲎', 6, 1.2),
|
||||
// new FishInfo(19, '大四喜', 7, 0.5),
|
||||
// new FishInfo(20, '黄金锤头鲨', 7, 0.5),
|
||||
// new FishInfo(21, '金海姆', 7, 0.6),
|
||||
// new FishInfo(22, '五福临门', 8, 0.4),
|
||||
// new FishInfo(23, '金海龟', 8, 0.7),
|
||||
// new FishInfo(24, '金鲨', 8, 0.5),
|
||||
// new FishInfo(25, '蓝鲨', 8, 0.5),
|
||||
// new FishInfo(26, '美人鱼', 14, 0.4),
|
||||
// new FishInfo(27, '金龙', 14, 0.3),
|
||||
// new FishInfo(28, '章鱼', 10, 0.5),
|
||||
// new FishInfo(29, '电鳗鱼', 3, 0.8),
|
||||
// new FishInfo(1, '蝴蝶鱼'),
|
||||
// new FishInfo(2, '鲶鱼'),
|
||||
// new FishInfo(3, '狮子鱼'),
|
||||
// new FishInfo(4, '条纹鱼'),
|
||||
// new FishInfo(5, '沙丁鱼'),
|
||||
// new FishInfo(6, '石斑鱼'),
|
||||
// new FishInfo(7, '河豚'),
|
||||
// new FishInfo(8, '海螺'),
|
||||
// new FishInfo(9, '接吻鱼'),
|
||||
// new FishInfo(10, '海姆'),
|
||||
// new FishInfo(11, '绿鳍鱼'),
|
||||
// new FishInfo(12, '鲎'),
|
||||
// new FishInfo(13, '魔鬼鱼'),
|
||||
// new FishInfo(14, '小海龟'),
|
||||
// new FishInfo(15, '锤头鲨'),
|
||||
// new FishInfo(16, '金枪鱼'),
|
||||
// new FishInfo(17, '大三元'),
|
||||
// new FishInfo(18, '黄金鲎'),
|
||||
// new FishInfo(19, '大四喜'),
|
||||
// new FishInfo(20, '黄金锤头鲨'),
|
||||
// new FishInfo(21, '金海姆'),
|
||||
// new FishInfo(22, '五福临门'),
|
||||
// new FishInfo(23, '金海龟'),
|
||||
// new FishInfo(24, '金鲨'),
|
||||
// new FishInfo(25, '蓝鲨'),
|
||||
// new FishInfo(26, '美人鱼'),
|
||||
// new FishInfo(27, '金龙'),
|
||||
// new FishInfo(28, '章鱼'),
|
||||
// new FishInfo(29, '电鳗鱼'),
|
||||
]
|
||||
|
||||
public static async init() {
|
||||
this.config = []
|
||||
return new Promise<boolean>((resolve) => {
|
||||
fetch(`${config.url()}/fish/list`)
|
||||
.then((response) => response.text())
|
||||
.then((response) => {
|
||||
const { data: res } = JSON.parse(response)
|
||||
res.data.forEach((item) => {
|
||||
this.config.push(new FishInfo(item.ID, item.name, item.health))
|
||||
})
|
||||
resolve(true)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
public static getFishInfoByType(fishType: number) {
|
||||
for (let i = 0; i < this.config.length; i++) {
|
||||
const fishInfo: FishInfo = this.config[i]
|
||||
if (fishInfo.fishType === fishType) return fishInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
import { FishInfo } from './FishInfo'
|
||||
import config from './Config'
|
||||
export class FishConfig {
|
||||
public static config: Array<FishInfo> = [
|
||||
// new FishInfo(1, '蝴蝶鱼', 2, 2),
|
||||
// new FishInfo(2, '鲶鱼', 2, 1),
|
||||
// new FishInfo(3, '狮子鱼', 2, 2),
|
||||
// new FishInfo(4, '条纹鱼', 2, 2),
|
||||
// new FishInfo(5, '沙丁鱼', 2, 2),
|
||||
// new FishInfo(6, '石斑鱼', 2, 2),
|
||||
// new FishInfo(7, '河豚', 3, 1.2),
|
||||
// new FishInfo(8, '海螺', 3, 2),
|
||||
// new FishInfo(9, '接吻鱼', 3, 1.2),
|
||||
// new FishInfo(10, '海姆', 4, 1),
|
||||
// new FishInfo(11, '绿鳍鱼', 4, 1.2),
|
||||
// new FishInfo(12, '鲎', 4, 1.2),
|
||||
// new FishInfo(13, '魔鬼鱼', 5, 0.6),
|
||||
// new FishInfo(14, '小海龟', 5, 2),
|
||||
// new FishInfo(15, '锤头鲨', 6, 0.5),
|
||||
// new FishInfo(16, '金枪鱼', 6, 0.5),
|
||||
// new FishInfo(17, '大三元', 6, 0.5),
|
||||
// new FishInfo(18, '黄金鲎', 6, 1.2),
|
||||
// new FishInfo(19, '大四喜', 7, 0.5),
|
||||
// new FishInfo(20, '黄金锤头鲨', 7, 0.5),
|
||||
// new FishInfo(21, '金海姆', 7, 0.6),
|
||||
// new FishInfo(22, '五福临门', 8, 0.4),
|
||||
// new FishInfo(23, '金海龟', 8, 0.7),
|
||||
// new FishInfo(24, '金鲨', 8, 0.5),
|
||||
// new FishInfo(25, '蓝鲨', 8, 0.5),
|
||||
// new FishInfo(26, '美人鱼', 14, 0.4),
|
||||
// new FishInfo(27, '金龙', 14, 0.3),
|
||||
// new FishInfo(28, '章鱼', 10, 0.5),
|
||||
// new FishInfo(29, '电鳗鱼', 3, 0.8),
|
||||
// new FishInfo(1, '蝴蝶鱼'),
|
||||
// new FishInfo(2, '鲶鱼'),
|
||||
// new FishInfo(3, '狮子鱼'),
|
||||
// new FishInfo(4, '条纹鱼'),
|
||||
// new FishInfo(5, '沙丁鱼'),
|
||||
// new FishInfo(6, '石斑鱼'),
|
||||
// new FishInfo(7, '河豚'),
|
||||
// new FishInfo(8, '海螺'),
|
||||
// new FishInfo(9, '接吻鱼'),
|
||||
// new FishInfo(10, '海姆'),
|
||||
// new FishInfo(11, '绿鳍鱼'),
|
||||
// new FishInfo(12, '鲎'),
|
||||
// new FishInfo(13, '魔鬼鱼'),
|
||||
// new FishInfo(14, '小海龟'),
|
||||
// new FishInfo(15, '锤头鲨'),
|
||||
// new FishInfo(16, '金枪鱼'),
|
||||
// new FishInfo(17, '大三元'),
|
||||
// new FishInfo(18, '黄金鲎'),
|
||||
// new FishInfo(19, '大四喜'),
|
||||
// new FishInfo(20, '黄金锤头鲨'),
|
||||
// new FishInfo(21, '金海姆'),
|
||||
// new FishInfo(22, '五福临门'),
|
||||
// new FishInfo(23, '金海龟'),
|
||||
// new FishInfo(24, '金鲨'),
|
||||
// new FishInfo(25, '蓝鲨'),
|
||||
// new FishInfo(26, '美人鱼'),
|
||||
// new FishInfo(27, '金龙'),
|
||||
// new FishInfo(28, '章鱼'),
|
||||
// new FishInfo(29, '电鳗鱼'),
|
||||
]
|
||||
|
||||
public static async init() {
|
||||
this.config = []
|
||||
return new Promise<boolean>((resolve) => {
|
||||
fetch(`${config.url()}/fish/list`)
|
||||
.then((response) => response.text())
|
||||
.then((response) => {
|
||||
const { data: res } = JSON.parse(response)
|
||||
res.data.forEach((item) => {
|
||||
this.config.push(new FishInfo(item.ID, item.name, item.health))
|
||||
})
|
||||
resolve(true)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
public static getFishInfoByType(fishType: number) {
|
||||
for (let i = 0; i < this.config.length; i++) {
|
||||
const fishInfo: FishInfo = this.config[i]
|
||||
if (fishInfo.fishType === fishType) return fishInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "c7516237-7eb2-4767-8cc7-7ce0b2d5484e",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "c7516237-7eb2-4767-8cc7-7ce0b2d5484e",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
export class FishInfo {
|
||||
public fishType: number
|
||||
public name: string
|
||||
public blood: number
|
||||
// public wikiScale: number
|
||||
|
||||
constructor(
|
||||
fishType: number,
|
||||
name: string,
|
||||
blood: number,
|
||||
// wikiScale: number,
|
||||
) {
|
||||
this.fishType = fishType
|
||||
this.name = name
|
||||
this.blood = blood
|
||||
// this.wikiScale = wikiScale
|
||||
}
|
||||
}
|
||||
export class FishInfo {
|
||||
public fishType: number
|
||||
public name: string
|
||||
public blood: number
|
||||
// public wikiScale: number
|
||||
|
||||
constructor(
|
||||
fishType: number,
|
||||
name: string,
|
||||
blood: number,
|
||||
// wikiScale: number,
|
||||
) {
|
||||
this.fishType = fishType
|
||||
this.name = name
|
||||
this.blood = blood
|
||||
// this.wikiScale = wikiScale
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "03f14923-6d67-4d91-97ad-a81bf4f1551f",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "03f14923-6d67-4d91-97ad-a81bf4f1551f",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { FishMapInfo } from './FishMapInfo'
|
||||
|
||||
export class FishMap {
|
||||
public mapId: number
|
||||
public fishMapInfoList: Array<FishMapInfo>
|
||||
|
||||
constructor(mapId: number, list: Array<FishMapInfo>) {
|
||||
this.mapId = mapId
|
||||
this.fishMapInfoList = list
|
||||
}
|
||||
}
|
||||
import { FishMapInfo } from './FishMapInfo'
|
||||
|
||||
export class FishMap {
|
||||
public mapId: number
|
||||
public fishMapInfoList: Array<FishMapInfo>
|
||||
|
||||
constructor(mapId: number, list: Array<FishMapInfo>) {
|
||||
this.mapId = mapId
|
||||
this.fishMapInfoList = list
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "f84ce3e3-8c47-43ff-a6f4-7cda4c320fcf",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "f84ce3e3-8c47-43ff-a6f4-7cda4c320fcf",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
export class FishMapInfo {
|
||||
public fishType: number
|
||||
public scale: number
|
||||
public side: number // 1: -1:
|
||||
public x: number
|
||||
public y: number
|
||||
|
||||
constructor(fishType: number, scale: number, side: number, x: number, y: number) {
|
||||
this.fishType = fishType
|
||||
this.scale = scale
|
||||
this.side = side
|
||||
this.x = x
|
||||
this.y = y
|
||||
}
|
||||
}
|
||||
export class FishMapInfo {
|
||||
public fishType: number
|
||||
public scale: number
|
||||
public side: number // 1: -1:
|
||||
public x: number
|
||||
public y: number
|
||||
|
||||
constructor(fishType: number, scale: number, side: number, x: number, y: number) {
|
||||
this.fishType = fishType
|
||||
this.scale = scale
|
||||
this.side = side
|
||||
this.x = x
|
||||
this.y = y
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "5f3df30a-4677-4f9c-97a9-e80fcb5b8295",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "5f3df30a-4677-4f9c-97a9-e80fcb5b8295",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "704e17b3-0f7b-478a-8ad1-1cb2f5d89a8f",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "704e17b3-0f7b-478a-8ad1-1cb2f5d89a8f",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Vec2 } from 'cc'
|
||||
|
||||
export class FishPathInfo {
|
||||
public pathId: string
|
||||
public path: Array<Vec2> = []
|
||||
|
||||
constructor(pathId: string, path: Array<Vec2>) {
|
||||
this.pathId = pathId
|
||||
this.path = path
|
||||
}
|
||||
}
|
||||
import { Vec2 } from 'cc'
|
||||
|
||||
export class FishPathInfo {
|
||||
public pathId: string
|
||||
public path: Array<Vec2> = []
|
||||
|
||||
constructor(pathId: string, path: Array<Vec2>) {
|
||||
this.pathId = pathId
|
||||
this.path = path
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "01cc78a7-9862-45b4-ad09-ebb92c01de58",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "01cc78a7-9862-45b4-ad09-ebb92c01de58",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export class GameConfig {
|
||||
public static GameName: string = 'FishSingle'
|
||||
}
|
||||
export class GameConfig {
|
||||
public static GameName: string = 'FishSingle'
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "8b274344-0b4c-4ac5-a289-2f8cd7a5596b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "8b274344-0b4c-4ac5-a289-2f8cd7a5596b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user