public void OnSelectProjectile(EmplacementProjectileSelectButton fromButton) { SetProjectilePurchased(fromButton.obj.name); emplacement.ChangeProjectile(fromButton.obj); currentProjectileButton = fromButton; UpdateAll(); }
private void RefreshProjectileOptions() { projectileOptions = emplacement.GetProjectileOptions(); foreach (GameObject obj in projectileOptions) { GameObject newButton = Instantiate(projectileButtonPrefab, projectileButtonParent); EmplacementProjectileSelectButton butt = newButton.GetComponent <EmplacementProjectileSelectButton> (); FeedButtonData(butt, obj); if (butt.obj == emplacement.GetProjectilePrefab()) { currentProjectileButton = butt; SetProjectilePurchased(butt.obj.name); } } }