//Function called from AttackAction.PerformAction to show that an attack missed public void DisplayMissedAttack(float timeDelay_, CombatTile3D attackedCharTile_) { //Creating an instance of the damage text object prefab GameObject newDamageDisplay = GameObject.Instantiate(this.damageTextPrefab.gameObject); //Parenting the damage text object to this object's transform newDamageDisplay.transform.SetParent(this.transform); //Getting the DamageText component reference DamageText newDamageText = newDamageDisplay.GetComponent <DamageText>(); //Setting the info for the text newDamageText.DisplayMiss(timeDelay_, attackedCharTile_.transform.position); }