public override void Update() { if (Timer == 0) { TimerMax = 2 + (int)(9 * Rng.PollFloat()); } if (Timer == TimerMax) { BubbleObject bubbleObject = new BubbleObject(ObjSlotManager, Rng, Y, 0, 0, 0, 0, 0); ObjSlotManager.AddObject(bubbleObject); MarkForDeletion(); } Timer++; }
public override void Update() { int index = WaterState.Index; Input input = index < Inputs.Count ? Inputs[index] : new Input(0, 127); WaterState.Update(input, ObjSlotManager.WaterLevel); if ((WaterState.Y < (ObjSlotManager.WaterLevel - 160)) || (WaterState.Pitch < -0x800)) { if (!ObjSlotManager.HasBubbleSpawner()) { BubbleSpawnerObject bubbleSpawnerObject = new BubbleSpawnerObject(ObjSlotManager, Rng, WaterState.Y, 0, 0); ObjSlotManager.AddObject(bubbleSpawnerObject); } } }