Git Product home page Git Product logo

kodelua's Introduction

Kodelua 是一个轻量级的 MVC 框架

Kodelua 是为了开发移动游戏,结合使用 cocos2d-x 框架而开发一个轻量级的框架。

什么是 MVCS?

  • M 就是 Model 层,存储数据的地方,只提供2种接口,gets 和 sets 接口。
  • V 就是 View 层,界面显示的地方,处理界面的显示并提供 update 接口(提供给 controller 调用)来更新界面。
  • C 就是 Controller 层,处理游戏逻辑的地方,她需要与其他所有层打交道,她是总管。
  • S 就是 Service 层,负责与服务器端(如果用在客户端,完全可以用在服务器端)交互,只提供2中接口,请求和响应接口。

推荐结合 quick-cocos2d-x 框架一起使用,quick-cocos2d-x 针对 cocos2d-x 进行的大量的封装,并且能支持屏幕自适应,开发 Android 应用不在烦恼:)。

运行测试,在终端下运行:./main.lua,运行前请确保你已经安装了 lua 环境

输出:

[Info] sendNotification: name=StartApp, body={
  notice = "startup",
}, type=nil
{
  1 = {
    1 = "Andy",
    2 = "male",
    3 = "18",
  },
  2 = {
    1 = "Nataly",
    2 = "female",
    3 = "18",
  },
  3 = {
    1 = "Peter",
    2 = "male",
    3 = "20",
  },
}

阅读文档

开始阅读

kodelua's People

Contributors

andycai avatar wayee avatar

Watchers

 avatar

Forkers

xubingyue qn9663

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.