public static MisionSlot CreateComponent(GameObject where, MisionInfo _mision) { where.name = "Slot"; where.SetActive(false); MisionSlot myC = where.AddComponent <MisionSlot>(); myC.info = _mision; where.SetActive(true); return(myC); }
public void ClaimMisionRedward(MisionInfo info) { int i = GameManager.Instance.GetWorldIndex(info.wname); if (info.completed && misionsPerWorld[i].Contains(info)) { GameManager.Instance.SetGoldRedward(info.reward); MisionsPerWorld[i].Remove(info); SaveMisions(); } }
public Mision(MisionInfo info) { this.info = info; if (info.SubMisions.Count != 0) { for (int i = 0; i < info.SubMisions.Count; i++)//genero cantidad de misiones de a cuerdo a la dificultad { subMisionInfo subMision = info.SubMisions[i]; subMisions.Add(new SubMision(subMision)); } } Inventory.OnItemAdd += UpdateMisionProgres; }
public Mision LoadMision() { if (GameManager.Instance.ActiveMision != null) { MisionInfo actvMsn = GameManager.Instance.ActiveMision; if (GameManager.Instance.SelectedWorld == GameManager.Instance.GetWorldInfo(actvMsn.wname)) { return(new Mision(actvMsn)); } else { WorldInfo actvWorld = GameManager.Instance.SelectedWorld; GameManager.Instance.ActiveMision = MisionManager.Instance.GetMisionFromWorld(actvWorld); return(new Mision(GameManager.Instance.ActiveMision)); } } else { WorldInfo actvWorld = GameManager.Instance.SelectedWorld; GameManager.Instance.ActiveMision = MisionManager.Instance.GetMisionFromWorld(actvWorld); return(new Mision(GameManager.Instance.ActiveMision)); } }