Advertisement
Pro_Unit

Ability

Jun 10th, 2023
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.32 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. namespace CompositeWithScriptableObject.Abilities
  4. {
  5.     using Strategies;
  6.  
  7.     public abstract class Ability : ScriptableObject, IDamageStrategy
  8.     {
  9.         protected abstract IDamageStrategy Strategy { get; }
  10.  
  11.         public int CalculateFinalDamage(int damage) =>
  12.             Strategy.CalculateFinalDamage(damage);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement