Pro_Unit

DebugAbility

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