• 5月19日工作日志


    工作内容:

      针对网上现存的有关实现战棋战斗形式方面的插件进行了整理,并对其中的技能范围进行了增添,  

      在原有的菱形(diamond)方形(rect)十字形(line)的基础上增添了直线型的技能范围。

    Game_Map.prototype.createArea = function(x, y, param) {
    var area = {};
    if (param[0] === 'diamond') {
    this.setArea(area, this.isAreaValidDiamond, x, y, +param[1], true);
    } else if (param[0] === 'rect') {
    this.setArea(area, this.isAreaValidRect, x, y, +param[1], true);
    } else if (param[0] === 'line') {
    this.setArea(area, this.isAreaValidLine, x, y, +param[1], true);
    } else if (param[0] === 'straight') {
    this.setArea(area, this.isAreaValidPortrait, x, y, +param[1], true);
    } else if (param[0] === 'x') {
    this.setArea(area, this.isAreaValidX, x, y, +param[1], true);
    } else if (param[0] === 'T') {
    this.setArea(area, this.isAreaValidT, x, y, +param[1], true);
    } else if (param[0] === 'foward') {
    this.setArea(area, this.isAreaValidFoward, x, y, +param[1], true);
    }

    if (param[2] === 'diamond') {
    this.deleteArea(area, this.isAreaValidDiamond, x, y, +param[3], false);
    } else if (param[2] === 'rect') {
    this.deleteArea(area, this.isAreaValidRect, x, y, +param[3], false);
    } else if (param[2] === 'line') {
    this.deleteArea(area, this.isAreaValidLine, x, y, +param[3], false);
    } else if (param[2] === 'straight') {
    this.deleteArea(area, this.isAreaValidPortrait, x, y, +param[3], false);
    } else if (param[2] === 'x') {
    this.deleteArea(area, this.isAreaValidX, x, y, +param[3], false);
    } else if (param[2] === 'T') {
    this.deleteArea(area, this.isAreaValidT, x, y, +param[3], false);
    } else if (param[2] === 'foward') {
    this.deleteArea(area, this.isAreaValidFoward, x, y, +param[3], false);
    }
    return area;
    };

    对四元素领域增添了场景特效,效果图如下。

  • 相关阅读:
    Tomcat环境的搭建(web基础学习笔记一)
    子查询二(在HAVING子句中使用子查询)
    子查询一(WHERE中的子查询)
    分组统计查询(学习笔记)
    Oracle体系结构一(学习笔记)
    表分区(学习笔记)
    索引(学习笔记)
    序列(学习笔记)
    触发器七(复合触发器)(学习笔记)
    触发器六(系统触发器)(学习笔记)
  • 原文地址:https://www.cnblogs.com/song1900/p/9095968.html
Copyright © 2020-2023  润新知