コード例 #1
0
ファイル: LuaBindingActor.cpp プロジェクト: FooSoft/moonfall
int LuaBinding::ActorDisableShape()
{
    int actorId = 0;
    int actorShapeType = ACTOR_SHAPE_TYPE_COUNT;
    if (!Peek(1, &actorId) || !Peek(2, &actorShapeType) || actorShapeType >= ACTOR_SHAPE_TYPE_COUNT)
    {
        return ERROR_TYPE_PARAMETER;
    }

    const boost::shared_ptr<Actor> actor = GetActor(actorId);
    if (!actor)
    {
        return ERROR_TYPE_STATE;
    }

    actor->DisableShape(static_cast<ActorShapeType>(actorShapeType));
    return 0;
}