Advertisement
Pro_Unit

Agility

Jun 10th, 2023
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. namespace CompositeWithScriptableObject.Abilities
  4. {
  5.     using Strategies;
  6.    
  7.     [CreateAssetMenu(fileName = "Agility", menuName = "Composite With ScriptableObject/Abilities/Agility")]
  8.     public class Agility : Ability
  9.     {
  10.         public int Value;
  11.         private IDamageStrategy _strategy;
  12.  
  13.         protected override IDamageStrategy Strategy => _strategy ??= new AgilityDamageStrategy(Value);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement