public static WeaponActionCard NewMove(WeaponActionCard action) { string description = action.description; string type = action.type; float fuelCost = action.fuelCost; string spriteName = action.spriteName; Color color = action.color; float duration = action.duration; float forceOrVelocity = action.forceOrVelocity; return(new WeaponActionCard(description, type, fuelCost, spriteName, color, duration, forceOrVelocity)); }
public void addActionCard(ActionCard action) { if (action is MoveActionCard) { ActionCard addedCard = MoveActionCard.NewMove((MoveActionCard)action); actionList.Add(addedCard); } else { ActionCard addedCard = WeaponActionCard.NewMove((WeaponActionCard)action); actionList.Add(addedCard); } }