public void Copy(Effect baseEffect) { Reusable = baseEffect.Reusable; Targetless = baseEffect.Targetless; isReady = baseEffect.isReady; if (!isReady && baseEffect.neededResources.Count == 0) { isReady = true; } neededResources.Clear(); foreach (var rr in baseEffect.neededResources) { requestedResource newR = new requestedResource(rr.resource); neededResources.Add(newR); } givenResource = baseEffect.givenResource; }
public Effect(bool mReuse, bool mTarget, bool mReady, List <requestedResource> mNeeded, List <Resource> mGiven) { Reusable = mReuse; Targetless = mTarget; isReady = mReady; if (!isReady && mNeeded.Count == 0) { isReady = true; } neededResources.Clear(); foreach (var rr in mNeeded) { requestedResource newR = new requestedResource(rr.resource); neededResources.Add(newR); } givenResource = mGiven; }