public void ChangeDefPlay(DefPlay defPlay)//called from UI { if (!gameManager.isHiked) { gameManager.ChangeDefPlay(defPlay); currentDefPlay = defPlay; } }
public void ChangeDefPlay(DefPlay defPlay) { currentDefPlay = Instantiate(defPlay, lineOfScrimmage.transform.position, lineOfScrimmage.transform.rotation); var zoneParent = GameObject.Find("ZoneObjects"); currentDefPlay.transform.SetParent(zoneParent.transform); defPlayChange?.Invoke(currentDefPlay); }