GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - LaiYizhou/LuaComponents: 基于纯Lua实现,将entity逻辑组件化(entity based on components, implemented by pure Lua)

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
_images
_images
 
 
luaCommon
luaCommon
 
 
luaComponents
luaComponents
 
 
README.md
README.md
 
 
actor.lua
actor.lua
 
 
actor_comp_config.lua
actor_comp_config.lua
 
 
actor_const.lua
actor_const.lua
 
 
actor_manager.lua
actor_manager.lua
 
 
hero.lua
hero.lua
 
 
main.lua
main.lua
 
 
monster.lua
monster.lua
 
 

Repository files navigation

LuaComponents

UML

Tips:

  1. 核心是:一个 ComponentOwner 组装若干个 BaseComponent 子类

    (即:用组合而不用继承 Favour composition over inheritance )

  2. 代码详见 luaComponents 文件夹;

  3. 各组件之间可以通过事件通讯,相当于一个星状结构,本代码自带事件系统;

  4. 示例是从 ComponentOwner 派生了一个 Actor 的概念,然后再派生出不同类型的,比如,英雄、野怪等,根根据不同类型的Actor 而组装不同的 BaseComponent 子类,通过 actor_comp_config.lua 配置实现;

  5. 示例的入口是:main.lua

About

基于纯Lua实现,将entity逻辑组件化(entity based on components, implemented by pure Lua)

Topics

componentslua

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.