float BasicAttack() { GameObject basicAttack = Instantiate(basicAttackPrefab, transform, false) as GameObject; BasicAttack ba = basicAttack.GetComponent <BasicAttack> (); ba.Init(gameObject); return(ba.cooldown); }