Example #1
0
void Weapon::Clone(Weapon *pClone)
{
	Component::Clone(pClone);

	SetAcceleration(pClone->GetAcceleration());
	SetCooldown(pClone->GetCooldown());
	SetSpeed(pClone->GetSpeed());
	SetDamage(pClone->GetDamage());
}
bool Dash::Initialize()
{
	SetDamage(0.0f);
	SetTime(0.0);
	SetStatusEffect(&StatusEffect());
	SetCooldown(0.0f);
	m_totalCooldown = DASH_COOLDOWN;
	m_stacks = -1;
	return true;
}
bool Dash::Execute(float p_distance)
{
	if (Ability::Execute(p_distance))
	{
		/*if (m_sound != nullptr){
			m_sound->PlaySound(PLAYSOUND::PLAYSOUND_DASH_STEPS_SOUND);
		}*/
		Network::GetInstance()->SendAbility(ABILITIES_DASH,0);
		SetCooldown(DASH_COOLDOWN);
		return true;
	}
	return false;
}
Example #4
0
void Weapon::Init()
{
	m_fAcceleration			= 0.0f;
	float fCooldown			= 45.0f / 1000.0f;
	SetCooldown(fCooldown);
	m_fSpeed				= 17.0f;
	m_fFiringSpread			= PI / 16.0f;

	m_Damage.m_fEnergyDamage	= 0.0f;
	m_Damage.m_fPhysicalDamage	= 1.0f;

	Node *pNode			= new Node();
	switch (GenerateRandomInt(3))
	{
		case 0:
			pNode->SetVisual("data\\visuals\\p_blue.3ds");
			pNode->m_vScale.x	= 0.20f;
			pNode->m_vScale.y	= 0.20f;
			pNode->m_vScale.z	= 0.20f;
			break;
		case 1:
			pNode->SetVisual("data\\visuals\\p_green.3ds");
			pNode->m_vScale.x	= 0.25f;
			pNode->m_vScale.y	= 0.25f;
			pNode->m_vScale.z	= 0.25f;
			break;
		case 2:
			pNode->SetVisual("data\\visuals\\p_orng.3ds");
			pNode->m_vScale.x	= 0.30f;
			pNode->m_vScale.y	= 0.30f;
			pNode->m_vScale.z	= 0.30f;
			break;
		case 3:
			pNode->SetVisual("data\\visuals\\p_red.3ds");
			pNode->m_vScale.x	= 0.15f;
			pNode->m_vScale.y	= 0.15f;
			pNode->m_vScale.z	= 0.15f;
			break;

	}

	SetNode(pNode);
	pNode->Release();
}
Example #5
0
	BOOL ScriptLogic_T::StartChanneling(Obj_Character& rMe) const
	{
		__ENTER_FUNCTION
		SkillInfo_T& rSkillInfo = rMe.GetSkillInfo();
		TargetingAndDepletingParams_T& rParams = rMe.GetTargetingAndDepletingParams();
		Time_t nChannelTime = rSkillInfo.GetChannelTime();
		Time_t nCooldown = rSkillInfo.GetCooldownTime();
		if(0<nChannelTime)
		{
			if(FALSE==rParams.GetIgnoreConditionCheckFlag())
			{
				if(FALSE==Script_OnConditionCheck(rMe))
				{
					return FALSE;
				}
				if(FALSE==Script_OnDeplete(rMe))
				{
					return FALSE;
				}
			}
			SetCooldown(rMe,(CooldownID_t)rSkillInfo.GetCooldownID(),nCooldown);
			if(TRUE==GetGlobalActionDelegator().RegisterChannelActionForScript(rMe, rParams.GetActivatedSkill(), nChannelTime, rSkillInfo.GetChargesOrInterval()))
			{
				rParams.SetErrCode(OR_OK);
				Script_OnActivateOnce(rMe);
				return TRUE;
			}
		}
		else
		{
			return StartLaunching(rMe);
		}
		return FALSE;
		__LEAVE_FUNCTION
		return FALSE;
	}