fekalnigtacko/src/gameview/entityview.hpp
2026-01-09 23:13:35 +01:00

48 lines
831 B
C++

#pragma once
#include <stdexcept>
#include "game/transform_node.hpp"
#include "gfx/draw_list.hpp"
#include "audio/player.hpp"
#include "net/defs.hpp"
#include "net/inmessage.hpp"
#include "utils/defs.hpp"
namespace game::view
{
class WorldView;
struct UpdateInfo
{
float time;
float delta_time;
};
class EntityView
{
public:
EntityView(WorldView& world);
DELETE_COPY_MOVE(EntityView)
virtual bool ProcessMsg(net::EntMsgType type, net::InMessage& msg);
virtual void Update(const UpdateInfo& info);
virtual void Draw(gfx::DrawList& dlist);
const TransformNode& GetRoot() const { return root_; }
virtual ~EntityView() = default;
protected:
WorldView& world_;
TransformNode root_;
bool visible_ = false;
audio::Player audioplayer_;
};
} // namespace game::view