This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System; | |
using System.Runtime.Serialization; | |
[Serializable] | |
public class BaseEffect { | |
[NonSerialized] | |
public Unit AttachedUnit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Serializable] | |
public class ZapEffect : BaseEffect { | |
private int[] _damagePerCharge = new int[] { 1, 2, 3 }; | |
public override void Apply() | |
{ | |
int multiplier = (Ability as Spell).Charges.Percentage == 1 ? 2 : 1; | |
int damage = _damagePerCharge[Ability.Level] * (Ability as Spell).Charges.Current * multiplier; | |
BattleApp.Instance.ResolveDamage(damage, BattleApp.Instance.CurrentPlayer, BattleApp.Instance.CurrentTarget, DamageType.Wind); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void test(String s) { | |
int i = 0; | |
i++; | |
} |