public void OnAButton() { Attack attack = attackGO.GetComponent <Attack>(); if (playerProfile != null) { playerProfile.NbAttack = 1; } attack.ActionsList(); }