Skip to content

sonilyan/EasyEntitas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

EasyEntitas

based on the entitas and entitas-lite

image

1)增加了reactive system的支持。 2)可以正确的触发值类型的改变事件。 3)全新的接口,消除歧义,使用习惯更贴近于entitas本体。 4)增加各种单例事件的监听事件。 5)一系列的bug修正等。

事件相关:

	public virtual void Link(IEntity entity, IContext context) {
	gameObject.Link(entity, context);
	e = (Entity)entity;
	e.AddListener<PositionComponent>(this);
	e.AddListener<DestroyedComponent>(this);

	var pos = e.Get<PositionComponent>().value;
	transform.localPosition = new Vector3(pos.x, pos.y);
	}

基于委托的初始化:

	Contexts.Get<Input>().CreateEntity().Add<InputComponent>(x =>
	{
		x.x = (int) pos.x;
		x.y = (int) pos.y;
	});

官方的单消例子是跑起来了,剩下的自己看代码吧

About

based on the entitas and entitas-lite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages