public override void SafeAwake() { Key1 = AddKey("Lock On", //按键信息 "Locked", //名字 KeyCode.T); //默认按键 Key2 = AddKey("Launch", //按键信息 "Launch", //名字 KeyCode.X); //默认按键 延迟 = AddSlider("Delay for detecting impact and target", //滑条信息 "Delay", //名字 0f, //默认值 0f, //最小值 5f); //最大值 不聪明模式 = AddToggle("Disable Smart Attack", //toggle信息 "NoSA", //名字 false); //默认状态 }
//BlockLoader Specific method: is called right after the script is made - usually, //this is done for all blocks of this type and is safe as it waits for stuff like //colliders, visuals, resources and so on public override void SafeAwake() { //Set the blocks original scale orgScale = transform.localScale; activateKey = AddKey("Sound The Horn", //Display text "play", //save name KeyCode.H); //Keyboard button pitchSlider = AddSlider("Pitch", //Display Text "pitch", //save name 1f, //default value 0.5f, //minimum value 2f); //maximum value volumeSlider = AddSlider("Volume", //Display Text "volume", //save name 1f, //default value 0.1f, //minimum value 1f); //maximum value semitoneToggle = AddToggle("Semitone Snap", //Display Text "semitones", //save name true); //default value //Call HandleSemiToneSnap() when the slider value changes pitchSlider.ValueChanged += HandleSemitoneSnap; }
public override void SafeAwake() { 引爆 = AddKey("Detonated", //按键信息 "Deto", //名字 KeyCode.K); //默认按键 保险 = AddKey("Safety", //按键信息 "Safe", //名字 KeyCode.Alpha1); //默认按键 延迟 = AddSlider("Collision Explosion Delay", //滑条信息 "Delay", //名字 0.2f, //默认值 0f, //最小值 10f); //最大值 模式 = AddMenu("Modes", 0, new List<string>() { "Bomb", "Motion Stopper", "DestroyImmediate" }); }
public override void SafeAwake() { ActivateTargetIndicator = AddKey("Target Indicator", //按键信息 "TI", //名字 KeyCode.C); //默认按键 HideThisPanel = AddToggle("Hide this\n block's panel", //toggle信息 "Hide", //名字 false); //默认状态 ActiveHUD = AddKey("Toggle HUD", "HUD", KeyCode.Tab); HidePanel = AddKey("Hide Panel", "Panel", KeyCode.Backspace); AdvTI = AddToggle("ADVANCED \n Target Indicator", //toggle信息 "AdvTI", //名字 false); //默认状态 AdvTIS = AddSlider("Amount of Lines", "LineAmt", 20f, 2f, 45f); StartColour = AddColourSlider("Start Color of the line", "SColor", Color.red); EndColour = AddColourSlider("End Color of the line", "EColor", Color.yellow); }
public override void SafeAwake() { Key1 = AddKey("Spawn block", //按键信息 "Spawn", //名字 KeyCode.V); //默认按键 List<string> list = new List<string>(); foreach (BlockPrefab pair in PrefabMaster.BlockPrefabs.Values) { list.Add(pair.gameObject.GetComponent<MyBlockInfo>().blockName); 对应的IDs.Add(pair.ID); } 模块ID = AddMenu("Block", 0, list); 模块ID.ValueChanged += IDChanged; modifyBlock = AddToggle("Modify Spawned Block", "modifySpawnedBlock", false); modifyBlock.Toggled += (b) => { if (b) { SpawnChild(); modifyBlock.IsActive = false; BlockMapper.Open(blockToSpawn); } }; 生成间隔 = AddSlider("Spawn Frequency", //滑条信息 "Freq", //名字 0.25f, //默认值 0f, //最小值 10f); //最大值 生成大小 = AddSlider("Block Scale", //滑条信息 "Scale", //名字 1f, //默认值 0.01f, //最小值 100f); //最大值 继承速度 = AddToggle("Inherit My Velocity", //toggle信息 "IMV", //名字 true); //默认状态 FunnyMode = AddToggle("Funny Mode", //toggle信息 "FMD", //名字 false); //默认状态 FunnyMode.Toggled += (t) => { modifyBlock.DisplayInMapper = !t; }; }