Advertisement
Pro_Unit

Armor

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