Coder Social home page Coder Social logo

creatorconsole's Introduction

CreatorConsole 游戏内置控制台

CreatorConsole是一款支持在CocosCretor游戏运行时启动控制台的插件,该插件具有以下特性:

  • 内置输出 :虽然WEB的浏览器控制台很方便,但原生输出的话,开发者是无法直观地看到调试输出的,因此,直接在游戏内部可视化输出日志就相当方便了;
  • 支持命令 :除了日志输出外,CreatorConsole还支持自定义命令,就跟shell一样,你可以实时输入命令来控制程序,例如键入'cl',可实现清屏;
  • 开放源码 :由于是开放源码的,因此你可以自由地拓展功能,例如定义更多的命令等。

使用说明

  • 安装
  • 在场景中使用
  • 在代码中使用
  • 命令

安装

从[GitHub](https://github.com/jeason1997/CreatorConsole)上下载Zip文件,解压,覆盖到你的项目目录下。

在场景中使用

打开项目,将Asset/Plugins/CreatorConsole/Console.prefab拖入到场景中

注意:Console.prefab 拖入场景后一定要至于节点层级的最顶层,确保console.js最先被加载。

Scene

在代码中使用

// 像平常一样直接输出即可
cc.log('Hello World');
cc.warn('Warning!');
cc.error('Fucking!');

命令

Command Describe
Help 显示帮助,列出所有命令
Cl 清空屏幕
E [script] 执行脚本,例如'E var i = 10;'
Q 退出控制台
Command

creatorconsole's People

Watchers

马骐 avatar James Cloos 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.