HTML5 游戏引擎 Coffee2D

码农软件 · 软件分类 · 游戏开发包 · 2019-10-05 08:58:14

软件介绍

Coffee2D 是一个 HTML5 游戏引擎,它将开发 HTML5 Canvas 游戏中大量的工作抽象出来,例如 CoffeeScript 特性(如 class 关键字)来更好的与游戏和 CoffeeScript 集成。

Coffee2D 当前提供:

  • 简单场景图

  • 精灵渲染

  • 事件处理

  • 动画

  • Isometric 地图

组件:

class Card extends Component
  constructor: (@suit, @value) ->
    super()
    @setSize(50, 80)
    # the rectangle will be drawn automatically
    @addChild new Rect 0, 0, @size.w, @size.h, 'white'

  update: (dt) ->
    # dt is delta time passed since last update
    # (update stuff...)
    super()

  draw: (ctx) ->
    # ctx is the canvas context associated with this scene
    # (draw additional stuff other than the rectangle...)
    super()

事件处理:

# event origin is automatically set to unit
unit.dispatchEvent {type: 'kill', target: enemy}
enemy.addListener 'kill', (evt) -> if evt.target == enemy then enemy.die()

# can also fire events from Event class, origin will not be set
Event.dispatchEvent {type: 'init'}

本文地址:https://codercto.com/soft/d/16072.html

重来2

重来2

[美] 贾森·弗里德、[美] 戴维·海涅迈尔·汉森 / 苏西 / 中信出版社 / 2014-4-8 / 39.00元

“不再需要办公室”,这不仅仅是未来才有的事——它已经发生了。现在,轮到你迈开脚步,跟上时代的步伐了。 上百万的员工和成千上万的企业已经发现了远程工作的乐趣和好处。然而,远程工作方式还没有成为常见的选择。事实上,远程工作的技术手段都已齐备。还没有升级换代的,是人们的思想。 这本书的目的就是帮你把想法升级换代。作者会向你展示远程工作的诸多好处:可以找到最优秀的人才,从摧残灵魂的通勤路上解脱......一起来看看 《重来2》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

html转js在线工具
html转js在线工具

html转js在线工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具