GithubHelp home page GithubHelp logo

wuxingogo / cocoslite Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 2youyou2/cocoslite

0.0 3.0 0.0 85.46 MB

An open source game editor for cocos2d-js

Home Page: http://cocokele.com

License: MIT License

JavaScript 82.61% HTML 14.33% Ruby 0.06% CSS 2.73% Shell 0.06% PHP 0.20% Makefile 0.02% Clojure 0.01%

cocoslite's Introduction

Welcome to CocosLite

image

CocosLite is a modern open-source game editor for cocos2d-js. Let you make games for html5, ios, android, desktop.

CocosLite is based on brackets code editor

CocosLite includes a component system, it let you extend the editor easily. You just need write a Component according to a behavior, and attach to a GameObject

A simple behavir maybe like this:

var KeyManager = cl.getModule("utils/KeyManager");

var Params = function() {

    this.properties = ["speed"];

    this.speed = 30;

    this.ctor = function() {
        this._super();
    }

    this.onEnter = function() {
        this.t = this.getComponent("TransformComponent");
    };

    this.onUpdate = function(dt) {
        if(KeyManager.isKeyDown(cc.KEY.left)) {
            this.t.x -= this.speed;
        } 
        else if (KeyManager.isKeyDown(cc.KEY.right)) {
            this.t.x += this.speed;
        }  
    };

    this._folder_ = "Script";
}

var Run = Component.extendComponent("Run", new Params);

CocosLite will auto bind this.properties in the editor. You will see it in the Inspector panel, and it is als auto binded to undo/redo system.

this._folder_ is the Component folder, when you click the AddComponent button in the Inspector. The Component selector will show the Components with a divide view according to this property.

cocoslite's People

Contributors

2youyou2 avatar bchintx avatar busykai avatar chrisbank avatar couzteau avatar dangoor avatar denniskehrig avatar eztierney avatar gruehle avatar ingorichter avatar iwehrman avatar jasonsanjose avatar jbalsas avatar jdiehl avatar jeffrybooher avatar joelrbrandt avatar larz0 avatar lkcampbell avatar miguelcastillo avatar mynetx avatar njx avatar peterflynn avatar pthiess avatar raymondlim avatar redmunds avatar tommalbran avatar tvoliter avatar walfgithub avatar websitedeveloper avatar zaggino avatar

Watchers

 avatar  avatar  avatar

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.