unity-decorator-pattern
CommunityDynamically modify stats by wrapping objects.
AuthorMuharremTozan
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Dynamically modify object behavior at runtime by wrapping base stats, enabling reusable buffs, debuffs, and composable effects without subclassing.
Core Features & Use Cases
- Generic interface IDecorator<T> for any value type to enable layered modifiers.
- Stat modifiers (PercentageModifier and FlatModifier) that can be stacked to compose complex effects.
- Real-world use: apply a +20% buff and a +10 flat bonus to a base stat to compute final value in a game.
Quick Start
Create a BaseStat and wrap it with PercentageModifier and FlatModifier, then call GetValue to see the final result.
Dependency Matrix
Required Modules
None requiredComponents
referencesassets
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: unity-decorator-pattern Download link: https://github.com/MuharremTozan/Ohm-Yura/archive/main.zip#unity-decorator-pattern Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.