public void StopDrop() { if (this.DropStrategy != null) { this.DropStrategy.OnDropTreasure -= new OnDropTreasureChestDelegate(this.OnDrop); this.DropStrategy.Stop(); this.DropStrategy = null; } }
public void Reset(SLevelContext InLevelContext, int InMaxCount) { this.StopDrop(); this.maxDropCount = InMaxCount; this.DropStrategy = this.Factory.Create((int)InLevelContext.m_pveLevelType) as ITreasureChestStrategy; DebugHelper.Assert(this.DropStrategy != null, "no game type support you say a j8!"); if (this.DropStrategy != null) { this.DropStrategy.Initialize(this.maxDropCount); this.DropStrategy.OnDropTreasure += new OnDropTreasureChestDelegate(this.OnDrop); } }