Commit a25a4fef authored by wildfirecode's avatar wildfirecode

1

parent 66c730f0
......@@ -67,6 +67,7 @@ import { FestivalTarget } from '../something/uis/FestivalTarget';
import getRedBombAward, { getRedBombTimes } from '../getRedBombAward';
import { FesRedBombShowAni } from '../something/anisCall/FesRedBombShowAni';
import { RectsWaveAni } from '../something/anisCall/RectsWaveAni';
import { isSpecialLattice } from '../something/enum/LatticeType';
const aniClass = {
"BoomAni": BoomAni,
......@@ -489,7 +490,7 @@ export default class MainScene extends Scene {
this.lattices[i].reset(i);
}
//冰块
if (latticesD[i] == 2 || latticesD[i] == 3) {
if (isSpecialLattice(latticesD[i])) {
var p = Tool.getPositionByIndex(i);
let ice = Pool.takeOut(RecoverName.ICE);
if (!ice) {
......
## Lattice
# 主类
- initLattices();
# 数据
- index 索引 0-80。最多一共81个地图格子
# 控制器
## class Lattice
## Element 元素
## class Element
\ No newline at end of file
# 概念
- 地图配置 lattices
- 元素配置 elements
# 地图
- 需要居中,比如最多9列表,8列的需要水平居中
# lattices 地图背景配置
- 0无格子
- 1普通格子
- 2浅冰块
- 3深冰块
- 4石门
- 5石门+浅冰块
- 6石门+深冰块
# 包
- egret/src/something/chapters
# main scene 视图
- exchangeElementAni() 播放交换动画动画。只要交换就会播放,不管是否可以消除。
- simpleMatch() 判断是否可以消除
# main scene 数据
- exchangeData() 视图交换之后需要交换数据
# mainscene 控制
- eliminate() 消除方法。
\ No newline at end of file
import { ElementType } from "../enum/ElementType";
import ILattice from "../lattice/ILattice";
export class Ice extends egret.Bitmap {
export class Ice extends egret.Bitmap implements ILattice {
/**
* 消除次数
*/
......
/**
* 地图格子配置
*/
export enum LatticeType {
EMPTY=0,
NORMAL=1,
ICE=2,
DARK_ICE=3,
STONE=4,
STONE_AND_ICE=5,
STONE_AND_DARK_ICE=6
}
// * 0无格子
// * 1普通格子
// * 2浅冰块
// * 3深冰块
// * 4石门
// * 5石门+浅冰块
// * 6石门+深冰块
export const isSpecialLattice = (type:LatticeType) => {
return type != LatticeType.EMPTY && type != LatticeType.NORMAL;
}
\ No newline at end of file
import { GenerateLatData } from "./GenerateLatData";
import { LatticeType } from "../enum/LatticeType";
/**
* 地图数据接口
......@@ -13,8 +14,11 @@ export interface MapData {
* 1普通格子
* 2浅冰块
* 3深冰块
* 4石门
* 5石门+浅冰块
* 6石门+深冰块
*/
lattices: number[];
lattices: LatticeType[];
/**
* 能生成元素的格子索引
*
......
export default interface ILattice {
reset(n:number);
}
\ No newline at end of file
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