private void Awake() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } //Init _cardPanel = transform.Find("CardPanel").transform; CardChosen = false; GameManager.Instance.State = GameState.Acquiring; textImage[0] = transform.Find("ChooseNewCard_Text").GetComponent <Image>(); textImage[1] = transform.Find("Buttons").transform.GetChild(0).transform.GetChild(0).GetComponent <Image>(); }
public void Continue() { _myAnim.SetTrigger("Continue"); NewCardChooser cardChooser = GameObject.Instantiate(Resources.Load <GameObject>("prefabs/CardChoiceDialog"), transform.parent).GetComponent <NewCardChooser>(); //Unpack Map, if we win we move to enemy location and remove enemy. if we lose we reset our location MapData md = Utils.Load <MapData>("mapdata"); if (Win) { cardChooser.SetTextSprite(true); md.PlayerNodeID = GameManager.Instance.BattlingNode; md.Enemies.RemoveAll(x => x.NodeID == GameManager.Instance.BattlingNode); } else { cardChooser.SetTextSprite(false); } Utils.Save(md, "mapdata"); }