skilllist.cpp
来自「奇迹世界 部分源代码奇迹世界 部分源代码奇迹世界 部分源代码」· C++ 代码 · 共 56 行
CPP
56 行
#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 + =
减小字号Ctrl + -
显示快捷键?