smoke ok
This commit is contained in:
parent
ff1b987d33
commit
a36d16e5cb
@ -310,6 +310,11 @@ void Player::LootInteraction(Loot* entity)
|
|||||||
if (item_meta->i->_inventory_slot() >= 0 &&
|
if (item_meta->i->_inventory_slot() >= 0 &&
|
||||||
item_meta->i->_inventory_slot() < MAX_INVENTORY_NUM) {
|
item_meta->i->_inventory_slot() < MAX_INVENTORY_NUM) {
|
||||||
inventory[item_meta->i->_inventory_slot()] += entity->count;
|
inventory[item_meta->i->_inventory_slot()] += entity->count;
|
||||||
|
if (item_meta->i->_inventory_slot() > 12) {
|
||||||
|
if (item_meta->i->_inventory_slot() - 12 > curr_scope_idx) {
|
||||||
|
curr_scope_idx = item_meta->i->_inventory_slot() - 12;
|
||||||
|
}
|
||||||
|
}
|
||||||
need_sync_active_player = true;
|
need_sync_active_player = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
#include "precompile.h"
|
||||||
|
|
||||||
|
#include "smoke.h"
|
||||||
|
#include "metamgr.h"
|
||||||
|
#include "movement.h"
|
||||||
|
#include "room.h"
|
||||||
|
#include "collider.h"
|
||||||
|
#include "obstacle.h"
|
||||||
|
#include "player.h"
|
||||||
|
|
||||||
|
Smoke::Smoke():Entity()
|
||||||
|
{
|
||||||
|
entity_type = ET_Smoke;
|
||||||
|
}
|
||||||
|
|
||||||
|
Smoke::~Smoke()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Smoke::Initialize()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Smoke::Update(int delta_time)
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "entity.h"
|
||||||
|
|
||||||
|
namespace MetaData
|
||||||
|
{
|
||||||
|
struct Player;
|
||||||
|
struct Equip;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Human;
|
||||||
|
class Smoke : public Entity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MetaData::Equip* gun_meta = nullptr;
|
||||||
|
MetaData::Equip* meta = nullptr;
|
||||||
|
Human* player = nullptr;
|
||||||
|
Vector2D dir;
|
||||||
|
Vector2D born_pos;
|
||||||
|
Vector2D born_dir;
|
||||||
|
|
||||||
|
Smoke();
|
||||||
|
virtual ~Smoke() override;
|
||||||
|
virtual void Initialize() override;
|
||||||
|
virtual void Update(int delta_time) override;
|
||||||
|
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user