public void Restore(ResourceMemento Memento) { if (Memento.Type == this.Type) { this.Amount = Memento.Amount; } }
public ResourceMemento CreateMemento() { ResourceMemento Memento = new ResourceMemento(); Memento.Amount = this.Amount; Memento.Type = this.Type; return(Memento); }
public FieldMemento() { this.State = FieldStateNormal.GetInstance(); this.Resource = null; }