static void MakeDirectPower() { RPG.Status s = Selection.activeObject as RPG.Status; RPG.PowerDirect power = CreateAsset <RPG.PowerDirect>(s.name + "Direct"); power.effects = new RPG.Status[1]; power.effects[0] = s; }
static void MakeTogglePower() { RPG.Status s = Selection.activeObject as RPG.Status; RPG.PowerToggle power = CreateAsset <RPG.PowerToggle>(s.name + "Toggle"); power.type = GetDamageType(s, RPG.RPGSettings.DamageType.Magic); power.effects = new RPG.Status[1]; power.effects[0] = s; }
static void MakeBlockPower() { RPG.Status s = Selection.activeObject as RPG.Status; RPG.PowerDirect power = CreateAsset <RPG.PowerBlock>(s.name + "Block"); power.type = GetDamageType(s, RPG.RPGSettings.DamageType.Crushing); power.effects = new RPG.Status[1]; power.effects[0] = s; }
static void MakeMoveToPower() { RPG.Status s = Selection.activeObject as RPG.Status; RPG.PowerDirect power = CreateAsset <RPG.PowerMoveTo>(s.name + "MoveTo"); power.effects = new RPG.Status[1]; power.effects[0] = s; power.icon = AssetDatabase.LoadAssetAtPath <Sprite>("Assets/Gizmos/PowerMoveTo Icon.png"); }
static void MakeAreaPower() { RPG.Status s = Selection.activeObject as RPG.Status; RPG.PowerArea power = CreateAsset <RPG.PowerArea>(s.name + "Area"); power.type = GetDamageType(s, RPG.RPGSettings.DamageType.Fire); power.effects = new RPG.Status[1]; power.effects[0] = s; }
static RPG.RPGSettings.DamageType GetDamageType(RPG.Status s, RPG.RPGSettings.DamageType def) { RPG.DamageOverTime dot = s as RPG.DamageOverTime; if (dot) { return(dot.damageType); } return(def); }