private void Awake() { // clone()을 만들어서 초기값을 저장해둠 InstantEffectInitialValue = InstantEffect.Clone(instantEffect); PersistEffectInitialValue = PersistEffect.Clone(persistEffect); ConditionalEffectInitialValue = ConditionalEffect.Clone(conditionalEffect); }
public static CUseEffect Clone(CUseEffect origin) { return(new CUseEffect { IsUseEffectName = origin.IsUseEffectName, EffectName = origin.EffectName, instantEffect = InstantEffect.Clone(origin.instantEffect), persistEffect = PersistEffect.Clone(origin.persistEffect), conditionalEffect = ConditionalEffect.Clone(origin.conditionalEffect), }); }