Example #1
0
	private IEnumerator completeTheAttack(Attack attack) {
		yield return new WaitForSeconds(attack.getDuration());

		float damage = CalcDamage(attack);

		GameObject damageText = (GameObject) Instantiate(Resources.Load("HealthModifierPrefab"));
		HealthModifierText hmt = damageText.GetComponent<HealthModifierText> ();
		hmt.setAmount (attack.getAttackType(), damage);
		damageText.transform.position =  player.getHealthNotifyPosition();
		damageText.transform.rotation = player.getHealthNotifyRotation();

		anim.SetInteger ("CurrentAction", 0);
		attacking = false;
	}