Example #1
0
 private void SetAction(string actionType, int range, int damage, Weapons.Hitbox actionHitBox)
 {
     try
     {
         action        = (Actions.Action)Activator.CreateInstance(null, "Assets.Scripts.CardSystem.Actions." + actionType).Unwrap();
         action.Range  = range;
         action.Damage = damage;
         action.HitBox = actionHitBox;
     }
     catch (Exception e)
     {
         action = new Error();
         Debug.LogError(e.Message + ": for " + actionType + ".  Setting " + name + "'s action to Error.");
     }
 }
Example #2
0
 private void SetAction(string actionType, int range, int damage, Weapons.Hitbox actionHitBox)
 {
     try
     {
         action = (Actions.Action)Activator.CreateInstance(null, "Assets.Scripts.CardSystem.Actions." + actionType).Unwrap();
         action.Range = range;
         action.Damage = damage;
         action.HitBox = actionHitBox;
     }
     catch (Exception e)
     {
         action = new Error();
         Debug.LogError(e.Message + ": for " + actionType + ".  Setting " + name + "'s action to Error.");
     }
 }
Example #3
0
 private void SetAction(Weapons.Hitbox hitbox, string actionType, int range, int damage, GameObject prefab)
 {
     try
     {
         action         = (Actions.Action)Activator.CreateInstance(null, "Assets.Scripts.CardSystem.Actions." + actionType).Unwrap();
         action.HitBox  = hitbox;
         action.Range   = range;
         action.Damage  = damage;
         action.Prefab  = prefab;
         action.Element = this.element;
     }
     catch (Exception e)
     {
         action = new Error();
         Debug.LogError(e.Message + ": for " + actionType + ".  Setting " + name + "'s action to Error.");
     }
 }
Example #4
0
 private void SetAction(Weapons.Hitbox hitbox, string actionType, int range, int damage, GameObject prefab)
 {
     try
     {
         action = (Actions.Action)Activator.CreateInstance(null, "Assets.Scripts.CardSystem.Actions." + actionType).Unwrap();
         action.HitBox = hitbox;
         action.Range = range;
         action.Damage = damage;
         action.Prefab = prefab;
         action.Element = this.element;
     }
     catch (Exception e)
     {
         action = new Error();
         Debug.LogError(e.Message + ": for " + actionType + ".  Setting " + name + "'s action to Error.");
     }
 }