1
This commit is contained in:
parent
2751310f43
commit
fd9f9e2b96
@ -0,0 +1,34 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include "obstacle.h"
|
||||
#include "metamgr.h"
|
||||
#include "movement.h"
|
||||
#include "room.h"
|
||||
#include "collider.h"
|
||||
|
||||
Obstacle::Obstacle():Entity()
|
||||
{
|
||||
entity_type = ET_Obstacle;
|
||||
}
|
||||
|
||||
Obstacle::~Obstacle()
|
||||
{
|
||||
}
|
||||
|
||||
void Obstacle::Initialize()
|
||||
{
|
||||
RecalcSelfCollider();
|
||||
}
|
||||
|
||||
void Obstacle::RecalcSelfCollider()
|
||||
{
|
||||
#if 0
|
||||
if (!self_collider_) {
|
||||
self_collider_ = new CircleCollider();
|
||||
self_collider_->owner = this;
|
||||
colliders.push_back(self_collider_);
|
||||
}
|
||||
self_collider_->pos = Vector2D();
|
||||
self_collider_->rad = gun_meta->i->bullet_rad();
|
||||
#endif
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include "entity.h"
|
||||
|
||||
namespace MetaData
|
||||
{
|
||||
struct Player;
|
||||
struct Equip;
|
||||
struct MapThing;
|
||||
}
|
||||
|
||||
class Human;
|
||||
class CircleCollider;
|
||||
class Obstacle : public Entity
|
||||
{
|
||||
public:
|
||||
MetaData::MapThing* meta = nullptr;
|
||||
|
||||
Obstacle();
|
||||
virtual ~Obstacle() override;
|
||||
virtual void Initialize() override;
|
||||
void RecalcSelfCollider();
|
||||
|
||||
private:
|
||||
CircleCollider* self_collider_ = nullptr;
|
||||
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user