void ActionsInTheEnd() { //Actions is here(after timer) Info.MainHeroPosition = "right"; MainHero.IsLeft = true; MainHero.IsCanTalk = false; TopUI.SyncTopUi(); Application.LoadLevel("street_1"); }
bool BuyItems(bool isPressedF) { if (isPressedF && CheckExit(2)) { ChangeTheLvl("Street_0"); return(true); } else { if ((bool)selected[0] && MainHero.Gold >= SwordCost) //sword { MainHero.Gold -= SwordCost; MainHero.Damage += SwordDamage; TopUI.SyncTopUi(); GoToScene(1); SetTheMarkInArray(selected, 0); return(true); } else if (MainHero.Gold < SwordCost && isPressedF) { NotEnoughGold(SwordCost); return(false); } if ((bool)selected[1] && MainHero.Gold >= ShieldCost) //shiled { MainHero.Gold -= ShieldCost; MainHero.Armor += ShieldArmor; TopUI.SyncTopUi(); GoToScene(1); SetTheMarkInArray(selected, 0); return(true); } else if (MainHero.Gold < ShieldCost) { NotEnoughGold(ShieldCost); return(false); } } return(true); }
static void ActinsAfterGame(int award) { MainHero.Gold += award; MainHero.Level++; TopUI.SyncTopUi(); }