void PlayerComponent::readProperties(gameplay::Properties & properties) { _idleAnimComponentId = properties.getString("idle_anim"); _walkAnimComponentId = properties.getString("walk_anim"); _cowerAnimComponentId = properties.getString("cower_anim"); _jumpAnimComponentId = properties.getString("jump_anim"); _climbingCharacterComponentId = properties.getString("climb_anim"); _swimmingCharacterComponentId = properties.getString("swim_anim"); _movementSpeed = properties.getFloat("speed"); _swimSpeedScale = properties.getFloat("swim_speed_scale"); _jumpHeight = properties.getFloat("jump_height"); _physicsComponentId = properties.getString("physics"); }
void LevelComponent::readProperties(gameplay::Properties & properties) { _level = properties.getString("level", _level.c_str()); PLATFORMER_ASSERT(gameplay::FileSystem::fileExists(_level.c_str()), "Level '%s' not found", _level.c_str()); }