public Test() { this.Tick += onTick; this.KeyDown += onKeyDown; //this.Interval = 1000; // run every second // menu menuPool = new MenuPool(); SetupMenu(); modMenu.OnItemSelect += MenuSelect; // get player into position etc player = Game.Player.Character; //Sub(player.Position); // testing... //if (covid == null) //{ // covid = InstantiateScript<Covid>(); // covid.setMain(this); //} if (imageFace == null) { imageFace = InstantiateScript <ImageFace>(); imageFace.setMain(this); } }
void MenuSelect(UIMenu sender, UIMenuItem item, int index) { if (item == MI_ImageTest) { DoImageTest(); } if (item == MI_DeleteNearby) { DeleteAllNearby(); } if (item == MI_Vehicle) { StartVehicle(); } if (item == MI_Covid) { if (covid == null) { covid = InstantiateScript <Covid>(); covid.setMain(this); } } if (item == MI_Debug) { Debug = !Debug; } if (item == MI_ImageFace) { if (imageFace == null) { imageFace = InstantiateScript <ImageFace>(); imageFace.setMain(this); } } }