public override string ToString() { return("Stats: \n" + LanguageDao.GetLanguage("statstr", ref GameManager.language) + " " + STR + "\n" + LanguageDao.GetLanguage("statagi", ref GameManager.language) + " " + AGI + "\n" + LanguageDao.GetLanguage("statwis", ref GameManager.language) + " " + WIS + "\n" + LanguageDao.GetLanguage("statend", ref GameManager.language) + " " + END + "\n" + LanguageDao.GetLanguage("statint", ref GameManager.language) + " " + INT + "\n" + LanguageDao.GetLanguage("statluc", ref GameManager.language) + " " + LUC + "\n" + LanguageDao.GetLanguage("statcrit", ref GameManager.language) + " " + CriticalHitPercentage); }
private static void LoadLanguage(string lang) { Text[] bigTranslator = GameManager.GM.TextAndUI.GetComponentsInChildren <Text>(); Debug.Log(GameManager.GM); Debug.Log(GameManager.GM.TextAndUI); // Debug.Log(bigTranslator[0]); for (int i = 0; i < bigTranslator.Length; i++) { if (bigTranslator[i].name != "Attack (1)" && bigTranslator[i].name != "GameObject" && bigTranslator[i].name != "OPEN MENU" && bigTranslator[i].name != "Label") { bigTranslator[i].text = LanguageDao.GetLanguage(bigTranslator[i].name, ref lang); } } }
public void UseSkill(Actor to, Skill s) { var r = s.Targets; if (to == actor) { if (s.FX != null) { if (s.FX.Func.IsSpawner) { Error(LanguageDao.GetLanguage("applyempty", ref GameManager.language)); return; } } } if (!actor.CanUseSkill(s)) { Error(LanguageDao.GetLanguage("notenough", ref GameManager.language)); return; } if ((r == Skill.TargetType.AnAlly) && (!GameManager.CurrentBattle.IsTeamWith(actor, to) || to == this.actor)) { Error(LanguageDao.GetLanguage("applyally", ref GameManager.language)); return; } if ((r == Skill.TargetType.Enemy || r == Skill.TargetType.OneEnemy) && (GameManager.CurrentBattle.IsTeamWith(actor, to) || to == actor)) { Error(LanguageDao.GetLanguage("applyennemy", ref GameManager.language)); return; } if (r == Skill.TargetType.Self && to != actor) { Error(LanguageDao.GetLanguage("applyyou", ref GameManager.language)); return; } TurnSprite((to.TilePosition - actor.TilePosition).x < 0); GameManager.GM.ActionFreeze(); actor.UseEffect(s, to); GameManager.GM.ShowTabMenu(false); }
public void GetInfo(Actor a) { main.SetActive(true); Name.text = a.Name.ToUpper() + "\n" + LanguageDao.GetLanguage("the", ref GameManager.language).ToUpper() + " " + a.Class.type.ToString().ToUpper();; Stats.text = "STATS" + "\n" + LanguageDao.GetLanguage("statstr", ref GameManager.language) + " " + a.GetStats.STR + "\n" + LanguageDao.GetLanguage("statend", ref GameManager.language) + " " + a.GetStats.END + "\n" + LanguageDao.GetLanguage("statagi", ref GameManager.language) + " " + a.GetStats.AGI + "\n" + LanguageDao.GetLanguage("statint", ref GameManager.language) + " " + a.GetStats.INT + "\n" + LanguageDao.GetLanguage("statwis", ref GameManager.language) + " " + a.GetStats.WIS + "\n" + LanguageDao.GetLanguage("statluc", ref GameManager.language) + " " + a.GetStats.LUC; Lvl.text = LanguageDao.GetLanguage("lvl", ref GameManager.language) + " " + a.GetLevel + "\n" + LanguageDao.GetLanguage("exp", ref GameManager.language) + ": " + a.GetEXP.ToString("0000") + "\n" + LanguageDao.GetLanguage("nextxp", ref GameManager.language) + ": " + a.RequiredEXP.ToString("0000"); Desc.text = a.Description; stats2.text = LanguageDao.GetLanguage("def", ref GameManager.language) + ": " + a.GetStats.PhysDEF + " " + LanguageDao.GetLanguage("mdef", ref GameManager.language) + ": " + a.GetStats.MagDEF + " " + LanguageDao.GetLanguage("walk", ref GameManager.language) + ":" + (a.GetStats.MaximumSP * a.GetStats.AGI) + "\n" + LanguageDao.GetLanguage("statcrit", ref GameManager.language) + ":" + a.GetStats.CriticalHitPercentage.ToString("00.0") + "% " + "" + LanguageDao.GetLanguage("speed", ref GameManager.language) + ": " + (a.GetStats.Priority + a.GetStats.AGI) + " " + LanguageDao.GetLanguage("sp", ref GameManager.language) + ": " + a.GetStats.MaximumSP; }
public override string ToString() { return(Name + " " + LanguageDao.GetLanguage("lvl", ref GameManager.language) + " " + GetLevel); }
public IEnumerator InitiateAttack(Actor a, Skill b) { if (!GameManager.BattleMode) { yield break; } if (attacking || anim[0].GetBool(b.DmgType.ToString())) { anim[0].ResetTrigger(b.DmgType.ToString()); yield break; } if (!CanPerformAction(b)) { EndTurn(); yield break; } if (!MyTurn || actor.IsDefeat) { attacking = false; yield break; } AITImer = 0; attacking = true; tempattack = b; temptarget = a; actor.Move(a.TilePosition, true); foreach (var item in actor.Path) { if (GameManager.CurrentBattle.map.AtPos(item).Actor != null) { var f = GameManager.CurrentBattle.map.AtPos(item).Actor; if (f == actor) { continue; } if (f == a) { continue; } if ((f != actor && f != a) || f.IsTeamWith(actor)) { Error(f.Name + " " + LanguageDao.GetLanguage("isblocking", ref GameManager.language) + " " + name); attacking = false; tempattack = null; temptarget = null; StopAttacking(); yield break; } } } TurnSprite((temptarget.TilePosition - actor.TilePosition).x < 0); // while (Vector.Distance(actor.TilePosition, a.TilePosition) > b.Reach) //while (GameManager.EstimathPath(actor,a.TilePosition) > b.Reach) while (actor.Path.Count > b.Reach) { if (!MyTurn) { attacking = false; print("RAN OUT OF TIME!"); yield break; } yield return(null); } TurnSprite((temptarget.TilePosition - actor.TilePosition).x < 0); yield return(new WaitForSeconds(.2f)); if (actor.CanUseSkill(b)) { anim[0].SetTrigger(b.DmgType.ToString()); } attacking = false; yield break; }