/// <summary> /// Obtient l'attack range de l'arme du héros au niveau actuel. /// </summary> public float GetMyAttackRange() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)31).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); float returnValue = Single.Parse(input.ReadLine()); return((float)returnValue); }
/// <summary> /// Obtient toutes les données du jeu qui ne vont pas varier lors de son déroulement. A appeler une /// fois en PickPhase (pour récup les sorts) et une fois en GamePhase (pour récup les données de la /// map) /// </summary> public GameStaticDataView GetStaticData() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)0).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); GameStaticDataView returnValue = GameStaticDataView.Deserialize(input); return((GameStaticDataView)returnValue); }
/// <summary> /// Retourne la position du héros. /// </summary> public Vector2 GetMyPosition() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)22).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); Vector2 returnValue = Vector2.Deserialize(input); return((Vector2)returnValue); }
/// <summary> /// Obtient la phase actuelle du jeu : Pick (=> phase de picks) ou Game (phase de jeu). /// </summary> public SceneMode GetMode() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)41).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); SceneMode returnValue = (SceneMode)Int32.Parse(input.ReadLine()); return((SceneMode)returnValue); }
/// <summary> /// Arrête le déplacement automatique (A*) du joueur. /// </summary> public bool EndMoveTo() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)25).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); bool returnValue = Int32.Parse(input.ReadLine()) == 0 ? false : true; return((bool)returnValue); }
/// <summary> /// Obtient l'id du modèle d'enchantement d'arme équipé par le héros. (-1 si aucun) /// </summary> public int GetMyWeaponEnchantId() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)20).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); int returnValue = Int32.Parse(input.ReadLine()); return((int)returnValue); }
/// <summary> /// Retourne une vue vers le héros contrôlé par ce contrôleur. /// </summary> public EntityBaseView GetMyHero() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)21).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); EntityBaseView returnValue = EntityBaseView.Deserialize(input); return((EntityBaseView)returnValue); }
/// <summary> /// Lors de la phase de picks, retourne l'action actuellement attendue de la part de ce héros. /// </summary> public PickAction Picks_NextAction() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)1).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); PickAction returnValue = (PickAction)Int32.Parse(input.ReadLine()); return((PickAction)returnValue); }
/// <summary> /// Effectue une upgrade du spell passif du héros. /// </summary> public SpellUpgradeResult UpgradeMyPassiveSpell() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)38).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); SpellUpgradeResult returnValue = (SpellUpgradeResult)Int32.Parse(input.ReadLine()); return((SpellUpgradeResult)returnValue); }
/// <summary> /// Obtient une valeur indiquant si votre équipe possède la vision à la position donnée. /// </summary> public bool HasSightAt(Vector2 position) { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)26).ToString()); position.Serialize(output); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); bool returnValue = Int32.Parse(input.ReadLine()) == 0 ? false : true; return((bool)returnValue); }
/// <summary> /// Obtient la description du spell dont l'id est donné en paramètre. /// </summary> public SpellLevelDescriptionView GetMySpellCurrentLevelDescription(int spellId) { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)42).ToString()); output.WriteLine(((int)spellId).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); SpellLevelDescriptionView returnValue = SpellLevelDescriptionView.Deserialize(input); return((SpellLevelDescriptionView)returnValue); }
/// <summary> /// Effectue une upgrade d'un équipement indiqué en paramètre. /// </summary> public ShopTransactionResult ShopUpgrade(EquipmentType equipType) { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)8).ToString()); output.WriteLine(((int)equipType).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); ShopTransactionResult returnValue = (ShopTransactionResult)Int32.Parse(input.ReadLine()); return((ShopTransactionResult)returnValue); }
/// <summary> /// Lors de la phase de picks, permet à l'IA de pick un passif donné (si c'est son tour). /// </summary> public PickResult Picks_PickPassive(EntityUniquePassives passive) { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)4).ToString()); output.WriteLine(((int)passive).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); PickResult returnValue = (PickResult)Int32.Parse(input.ReadLine()); return((PickResult)returnValue); }
/// <summary> /// Utilise le sort d'id donné. Retourne true si l'action a été effectuée. /// </summary> public SpellUseResult UseMySpell(int spellId, SpellCastTargetInfoView target) { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)39).ToString()); output.WriteLine(((int)spellId).ToString()); target.Serialize(output); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); SpellUseResult returnValue = (SpellUseResult)Int32.Parse(input.ReadLine()); return((SpellUseResult)returnValue); }
public List <SpellView> GetSpells() { // Send List <object> args = new List <object>() { }; int funcId = 12; List <object> obj = new List <object>() { funcId, args }; TCPHelper.Send(Newtonsoft.Json.JsonConvert.SerializeObject(obj)); // Receive string str = TCPHelper.Receive(); Newtonsoft.Json.Linq.JArray o = (Newtonsoft.Json.Linq.JArray)Newtonsoft.Json.JsonConvert.DeserializeObject(str); return((List <SpellView>)o[0].ToObject(typeof(List <SpellView>))); }
public SceneMode GetMode() { // Send List <object> args = new List <object>() { }; int funcId = 9; List <object> obj = new List <object>() { funcId, args }; TCPHelper.Send(Newtonsoft.Json.JsonConvert.SerializeObject(obj)); // Receive string str = TCPHelper.Receive(); Newtonsoft.Json.Linq.JArray o = (Newtonsoft.Json.Linq.JArray)Newtonsoft.Json.JsonConvert.DeserializeObject(str); return(o.Value <SceneMode>(0)); }
public Vector2 GetPosition() { // Send List <object> args = new List <object>() { }; int funcId = 1; List <object> obj = new List <object>() { funcId, args }; TCPHelper.Send(Newtonsoft.Json.JsonConvert.SerializeObject(obj)); // Receive string str = TCPHelper.Receive(); Newtonsoft.Json.Linq.JArray o = (Newtonsoft.Json.Linq.JArray)Newtonsoft.Json.JsonConvert.DeserializeObject(str); return((Vector2)o[0].ToObject(typeof(Vector2))); }
public EntityBaseView GetHero() { // Send List <object> args = new List <object>() { }; int funcId = 0; List <object> obj = new List <object>() { funcId, args }; TCPHelper.Send(Newtonsoft.Json.JsonConvert.SerializeObject(obj)); // Receive string str = TCPHelper.Receive(); Newtonsoft.Json.Linq.JArray o = (Newtonsoft.Json.Linq.JArray)Newtonsoft.Json.JsonConvert.DeserializeObject(str); return((EntityBaseView)o[0].ToObject(typeof(EntityBaseView))); }
public SpellDescriptionView GetSpellCurrentLevelDescription(int spellId) { // Send List <object> args = new List <object>() { spellId }; int funcId = 10; List <object> obj = new List <object>() { funcId, args }; TCPHelper.Send(Newtonsoft.Json.JsonConvert.SerializeObject(obj)); // Receive string str = TCPHelper.Receive(); Newtonsoft.Json.Linq.JArray o = (Newtonsoft.Json.Linq.JArray)Newtonsoft.Json.JsonConvert.DeserializeObject(str); return((SpellDescriptionView)o[0].ToObject(typeof(SpellDescriptionView))); }
public bool UseSpell(int spellId, SpellCastTargetInfoView target) { // Send List <object> args = new List <object>() { spellId, target }; int funcId = 8; List <object> obj = new List <object>() { funcId, args }; TCPHelper.Send(Newtonsoft.Json.JsonConvert.SerializeObject(obj)); // Receive string str = TCPHelper.Receive(); Newtonsoft.Json.Linq.JArray o = (Newtonsoft.Json.Linq.JArray)Newtonsoft.Json.JsonConvert.DeserializeObject(str); return(o.Value <bool>(0)); }
public bool StartMoveTo(Vector2 position) { // Send List <object> args = new List <object>() { position }; int funcId = 3; List <object> obj = new List <object>() { funcId, args }; TCPHelper.Send(Newtonsoft.Json.JsonConvert.SerializeObject(obj)); // Receive string str = TCPHelper.Receive(); Newtonsoft.Json.Linq.JArray o = (Newtonsoft.Json.Linq.JArray)Newtonsoft.Json.JsonConvert.DeserializeObject(str); return(o.Value <bool>(0)); }
/// <summary> /// Obtient les points de la trajectoire du héros; /// </summary> public List <Vector2> GetMyTrajectory() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)32).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); List <Vector2> returnValue = new List <Vector2>(); int returnValue_count = Int32.Parse(input.ReadLine()); for (int returnValue_i = 0; returnValue_i < returnValue_count; returnValue_i++) { Vector2 returnValue_e = Vector2.Deserialize(input); returnValue.Add((Vector2)returnValue_e); } return((List <Vector2>)returnValue); }
/// <summary> /// Obtient la liste des id des enchantements disponibles au shop. /// </summary> public List <int> ShopGetEnchants() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)12).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); List <int> returnValue = new List <int>(); int returnValue_count = Int32.Parse(input.ReadLine()); for (int returnValue_i = 0; returnValue_i < returnValue_count; returnValue_i++) { int returnValue_e = Int32.Parse(input.ReadLine()); returnValue.Add((int)returnValue_e); } return((List <int>)returnValue); }
/// <summary> /// Retourne la liste des entités en vue /// </summary> public List <EntityBaseView> GetEntitiesInSight() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)28).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); List <EntityBaseView> returnValue = new List <EntityBaseView>(); int returnValue_count = Int32.Parse(input.ReadLine()); for (int returnValue_i = 0; returnValue_i < returnValue_count; returnValue_i++) { EntityBaseView returnValue_e = EntityBaseView.Deserialize(input); returnValue.Add((EntityBaseView)returnValue_e); } return((List <EntityBaseView>)returnValue); }
/// <summary> /// Lors de la phase de picks, permet à l'IA d'obtenir la liste des ID des spells passifs /// disponibles. /// </summary> public List <EntityUniquePassives> Picks_GetPassiveSpells() { System.IO.MemoryStream s = new System.IO.MemoryStream(); System.IO.StreamWriter output = new System.IO.StreamWriter(s, BOMLESS_UTF8); output.NewLine = "\n"; output.WriteLine(((int)3).ToString()); output.Close(); TCPHelper.Send(s.ToArray()); byte[] response = TCPHelper.Receive(); s = new System.IO.MemoryStream(response); System.IO.StreamReader input = new System.IO.StreamReader(s, BOMLESS_UTF8); List <EntityUniquePassives> returnValue = new List <EntityUniquePassives>(); int returnValue_count = Int32.Parse(input.ReadLine()); for (int returnValue_i = 0; returnValue_i < returnValue_count; returnValue_i++) { EntityUniquePassives returnValue_e = (EntityUniquePassives)Int32.Parse(input.ReadLine()); returnValue.Add((EntityUniquePassives)returnValue_e); } return((List <EntityUniquePassives>)returnValue); }