发现yake 0.7新特性
1 简单的触发器 你可以通过一个返回bool值的callback条件来决定状态机的transition....
2 res系统
脚本系统构造函数做了改动
// 添加了对象名
ent::LuaObjectManagerListener luaFmsObjListener(*luaSys, "main" );
编译错误
一个在const函数修改的问题
yake::math::Quaternion MovementComponent::getOrientation() const
{
// 保证目标存在
YAKE_ASSERT(mActor);
mOrientation = mActor->getOrientation();
return mOrientation;
}
搞了半天一直不知道为什么编译不能通过...
原来是因为我在const函数中对成员变量mOrientation做了修改...
带const的函数中是不能对任何成员变量做修改的..
在对应的函数上加上mutable关键字就可以了
mutable Vector3 mPosition;
mutable Quaternion mOrientation;
yake没有重载*= 操作符, 所有你不能这样用
rot *= mActor->getOrientation();
而应该这样写
rot = rot * mActor->getOrientation();
1 简单的触发器 你可以通过一个返回bool值的callback条件来决定状态机的transition....
2 res系统
脚本系统构造函数做了改动
// 添加了对象名
ent::LuaObjectManagerListener luaFmsObjListener(*luaSys, "main" );
编译错误
一个在const函数修改的问题
yake::math::Quaternion MovementComponent::getOrientation() const
{
// 保证目标存在
YAKE_ASSERT(mActor);
mOrientation = mActor->getOrientation();
return mOrientation;
}
搞了半天一直不知道为什么编译不能通过...
原来是因为我在const函数中对成员变量mOrientation做了修改...
带const的函数中是不能对任何成员变量做修改的..
在对应的函数上加上mutable关键字就可以了
mutable Vector3 mPosition;
mutable Quaternion mOrientation;
yake没有重载*= 操作符, 所有你不能这样用
rot *= mActor->getOrientation();
而应该这样写
rot = rot * mActor->getOrientation();