anonymous No title
No License Scala
2019年06月21日
Copy
void Add_Damage(float damage, bool ignoreDefence = false)
{
	float discount = 20f;
	float defense_coef = 1f;
	if( !ignoreDefence )
	{
		defense_coef = 1f - CS_Player_Status.Defense / discount;
	}
	if( damage * defense_coef > CS_Player_Status.Shield_Now )
	{
		Game_Over();
	}
	CS_Player_Status.Shield_Now -= damage * defense_coef;

	Debug.Log("ダメージ係数"+defense_coef);
	Debug.Log(damage * defense_coef);
}
void Add_Damage(float damage, bool ignoreDefence = false)
{
	float discount = 20f;
	float defense_coef = 1f;
	if( !ignoreDefence )
	{
		defense_coef = 1f - CS_Player_Status.Defense / discount;
	}
	if( damage * defense_coef > CS_Player_Status.Shield_Now )
	{
		Game_Over();
	}
	CS_Player_Status.Shield_Now -= damage * defense_coef;

	Debug.Log("ダメージ係数"+defense_coef);
	Debug.Log(damage * defense_coef);
}

年末年始は機械学習・深層学習を勉強しませんか?
No one still commented. Please first comment.
年末年始は機械学習・深層学習を勉強しませんか?
広告
未経験から最短でエンジニアへの転職を目指すなら