コード例 #1
0
ファイル: Entity.cpp プロジェクト: jackpoz/G3D-backup
void Entity::init
   (const std::string& name,
    Scene*             scene,
    AnyTableReader&    propertyTable) {

    // Track may need this to have a name
    m_name = name;

    m_sourceAny = propertyTable.any();

    shared_ptr<Track> track;
    Any c;
    if (propertyTable.getIfPresent("track", c)) {
        track = Track::create(this, scene, c);
    }

    bool canChange = true, shouldBeSaved = true;
    propertyTable.getIfPresent("canChange", canChange);
    propertyTable.getIfPresent("shouldBeSaved", shouldBeSaved);

    CFrame frame;
    propertyTable.getIfPresent("frame", frame);

    init(name, scene, frame, track, canChange, shouldBeSaved);
}