📄 skilllist.cpp
字号:
#include "stdafx.h"
#include "SkillList.h"
#include "Skill.h"
#include "SkillFactory.h"
SkillList::SkillList()
{
}
SkillList::~SkillList()
{
Release();
}
VOID SkillList::Release()
{
SKILL_LIST_ITER it;
for( it = m_listSkills.begin(); it != m_listSkills.end(); ++it )
{
Skill *pSkill = *it;
pSkill->CommonRelease();
SkillFactory::Instance()->FreeSkill( pSkill );
}
m_listSkills.clear();
}
// dwDelayTick捞 0老 版快 InstantBroadcast角青 饶 胶懦 贸府 场
VOID SkillList::Add( Skill *pSkill )
{
if( pSkill->GetSkillType() != SKILL_TYPE_PASSIVE )
{
pSkill->StartExecute();
m_listSkills.push_back( pSkill );
}
}
VOID SkillList::Update()
{
SKILL_LIST_ITER it;
DWORD dwCurTick = GetTickCount();
for( it = m_listSkills.begin(); it != m_listSkills.end(); ++it )
{
Skill *pSkill = *it;
if( dwCurTick >= pSkill->GetExecuteTick() ) // 何殿龋 荐沥!
{
pSkill->EndExecute();
SkillFactory::Instance()->FreeSkill( pSkill );
m_listSkills.erase( it-- );
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -