Beispiel #1
0
            public ObjSlotManager(List <Input> inputs)
            {
                GlobalTimer           = Config.Stream.GetInt(MiscConfig.GlobalTimerAddress);
                WaterLevelIndex       = WaterLevelCalculator.GetWaterLevelIndex();
                WaterLevel            = WaterLevelCalculator.GetWaterLevelFromIndex(WaterLevelIndex);
                FutureWaterLevelIndex = WaterLevelCalculator.GetWaterLevelIndex() + 1;
                FutureWaterLevel      = WaterLevelCalculator.GetWaterLevelFromIndex(FutureWaterLevelIndex);

                YorangeObjects = new List <WaterObject>();
                GreenObjects   = new List <WaterObject>();
                PurpleObjects  = new List <WaterObject>();
                BrownObjects   = new List <WaterObject>();
                ObjectLists    =
                    new List <List <WaterObject> >()
                {
                    YorangeObjects, GreenObjects, PurpleObjects, BrownObjects,
                };

                Rng = new TtcRng();

                MarioObject marioObject = new MarioObject(this, Rng, inputs);

                YorangeObjects.Add(marioObject);

                List <ObjectDataModel> bobombBuddyObjs = Config.ObjectSlotsManager.GetLoadedObjectsWithName("Bob-omb Buddy (Opens Cannon)");

                foreach (var bobombBuddyObj in bobombBuddyObjs)
                {
                    int blinkingTimer = Config.Stream.GetInt(bobombBuddyObj.Address + 0xF4);
                    BobombBuddyObject bobombBuddyObject = new BobombBuddyObject(this, Rng, blinkingTimer);
                    GreenObjects.Add(bobombBuddyObject);
                }

                List <ObjectDataModel> bubbleSpawnerObjs = Config.ObjectSlotsManager.GetLoadedObjectsWithName("Bubble Spawner");

                foreach (var bubbleSpawnerObj in bubbleSpawnerObjs)
                {
                    float y        = Config.Stream.GetFloat(bubbleSpawnerObj.Address + ObjectConfig.YOffset);
                    int   timer    = Config.Stream.GetInt(bubbleSpawnerObj.Address + ObjectConfig.TimerOffset);
                    int   timerMax = Config.Stream.GetInt(bubbleSpawnerObj.Address + 0xF4);
                    BubbleSpawnerObject bubbleSpawnerObject = new BubbleSpawnerObject(this, Rng, y, timer, timerMax);
                    PurpleObjects.Add(bubbleSpawnerObject);
                }

                List <ObjectDataModel> bubbleObjs = Config.ObjectSlotsManager.GetLoadedObjectsWithName("Underwater Bubble");

                foreach (var bubbleObj in bubbleObjs)
                {
                    float        y            = Config.Stream.GetFloat(bubbleObj.Address + ObjectConfig.YOffset);
                    int          timer        = Config.Stream.GetInt(bubbleObj.Address + ObjectConfig.TimerOffset);
                    float        varF4        = Config.Stream.GetFloat(bubbleObj.Address + 0xF4);
                    float        varF8        = Config.Stream.GetFloat(bubbleObj.Address + 0xF8);
                    float        varFC        = Config.Stream.GetFloat(bubbleObj.Address + 0xFC);
                    float        var100       = Config.Stream.GetFloat(bubbleObj.Address + 0x100);
                    BubbleObject bubbleObject = new BubbleObject(this, Rng, y, timer, varF4, varF8, varFC, var100);
                    BrownObjects.Add(bubbleObject);
                }
            }
Beispiel #2
0
 public BubbleSpawnerObject(
     ObjSlotManager objSlotManager, TtcRng rng,
     float y, int timer, int timerMax)
     : base(objSlotManager, rng)
 {
     Y        = y;
     Timer    = timer;
     TimerMax = timerMax;
 }
Beispiel #3
0
 public BubbleObject(
     ObjSlotManager objSlotManager, TtcRng rng,
     float y, int timer,
     float varF4, float varF8, float varFC, float var100)
     : base(objSlotManager, rng)
 {
     Y      = y;
     Timer  = timer;
     VarF4  = varF4;
     VarF8  = varF8;
     VarFC  = varFC;
     Var100 = var100;
 }
Beispiel #4
0
 public BobombBuddyObject(ObjSlotManager objSlotManager, TtcRng rng, int bobombBuddyBlinkingTimer)
     : base(objSlotManager, rng)
 {
     BobombBuddyBlinkingTimer = bobombBuddyBlinkingTimer;
 }
Beispiel #5
0
 public MarioObject(ObjSlotManager objSlotManager, TtcRng rng, List <Input> inputs)
     : base(objSlotManager, rng)
 {
     Inputs     = inputs;
     WaterState = new WaterState();
 }
Beispiel #6
0
 public WaterObject(ObjSlotManager objectSlotsManager, TtcRng rng)
 {
     ObjSlotManager  = objectSlotsManager;
     Rng             = rng;
     ShouldBeDeleted = false;
 }