载入中...
搜索中...
未找到
src
modules
economy
GatherNode.h
浏览该文件的文档.
1
#pragma once
2
#include "
common/Export.h
"
3
4
5
#include <string>
6
7
namespace
eve::economy
{
8
12
class
EVENGINE_API_FOUNDATION
GatherNode
{
13
public
:
21
GatherNode
(std::string
type
,
int
capacity
,
int
workerSlots = 1,
int
regenPerTick = 0);
22
24
std::string resourceType()
const
;
26
int
amount()
const
;
28
int
capacity
()
const
;
30
bool
depleted()
const
;
31
33
int
extract(
int
amount);
35
bool
tryOccupySlot();
37
void
releaseSlot();
39
int
freeSlots()
const
;
40
42
void
regenTick();
43
45
void
destroy
();
46
47
private
:
48
std::string type_;
49
int
capacity_ = 0;
50
int
amount_ = 0;
51
int
regenPerTick_ = 0;
52
int
workerSlots_ = 1;
53
int
occupiedSlots_ = 0;
54
};
55
56
}
// namespace eve::economy
type
LogicalId type
Definition
ActionTimelinePayloadEditor.cpp:16
Export.h
EVENGINE_API_FOUNDATION
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition
Export.h:106
capacity
std::uint32_t capacity
Definition
GraphicsParticles.cpp:37
destroy
void(* destroy)(void *)
Definition
JobSystemThreadPool.cpp:91
eve::economy::GatherNode
地图上的资源节点:储量、再生、采集槽位。
Definition
GatherNode.h:12
eve::economy
Definition
IEconomy.h:5