public override void ChildCreate(CompetencesData competence, int lvl) { CacComp comp = (CacComp)competence; adDamage = comp.adDamage + lvl; apDamage = comp.apDamage + lvl; manaCost = comp.manaCost + 2 * lvl; icon1 = comp.icon1; }
public void CacCompAth(CacComp comp) { GetComponentInChildren <Image>().sprite = comp.Icon1; Text[] te = transform.GetComponentsInChildren <Text>(); te[0].text = comp.Name; te[2].text = "Cooldown : " + comp.Cooldown; te[3].text = "Damage : " + comp.AdDamage; te[4].text = "Damage : " + comp.ApDamage; te[5].text = "Mana Cost : " + comp.ManaCost; }
public void Create(Weapons weapon) { _playerData = StaticData.actualData; comp = _playerData.Name == "Warrior" ? _playerData.Competences[1] as CacComp : null; _sprite = GetComponent <SpriteRenderer>(); _sprite.sprite = weapon.icon; if (!weapon.inPlayerInventory) { _sprite.sortingOrder = (int)((transform.position.y + 0.7) * -10); } Weapon = weapon; EdgeCollider2D collider = GetComponent <EdgeCollider2D>(); collider.points = weapon.ColliderPoints; PlayerMoveEvent.Raise(new EventArgsCoor(0, -1, int.Parse((string)Coffre.Regarder("id")))); }