/
ModelRule.h
49 lines (38 loc) · 1.2 KB
/
ModelRule.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once
#include "cocos2d.h"
#include "tools/GameCommon.h"
#include "RoleRule.h"
USING_NS_CC;
using namespace std;
class ModelRule:public Ref
{
public:
CLASS_INSTANCE(ModelRule);
bool init();
//获取模型图片名
string getModelFrameNameByModelId(int modelId,RoleStatus status,bool containPng = false);
//获取模型站立第一帧图片名
string getModelFirstFrameNameByModelId(int modelId,RoleStatus status);
//获取模型路径
string getModelPath(int modelId);
//获取模型锚点
Vec2 getModelAnchorPoint(int modelId);
//获取模型技能特效锚点
Vec2 getModelSkillEffectAnchorPoint(int modelId);
//获取模型普攻特效锚点
Vec2 getModelAttackEffectAnchorPoint(int modelId);
//获取模型受击范围
Size getModelHurtSize(int modelId);
//获取模型攻击范围
Size getModelAttackSize(int modelId);
//获取技能被击特效图片名
string getSkillHitFrameName(int skillId,bool containPng = false);
//获取技能被击特效锚点
Vec2 getSkillHitAnchorPoint(int skillId);
private:
ValueMap getModelDic(int modelId);
string getModelAttribute(int modelId,const string& attributeName);
ValueMap mainDic;
//int lastId;
//CCDictionary *lastSubDic;
};