Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Main(string argument, UpdateType updateSource)
- {
- launch();
- }
- List<IMyShipMergeBlock> getMerge()
- {
- List<IMyTerminalBlock> blocks = new List<IMyTerminalBlock>();
- GridTerminalSystem.GetBlocksOfType<IMyShipMergeBlock>(blocks);
- List<IMyShipMergeBlock> mergeBlocks = new List<IMyShipMergeBlock>();
- for(int n = 0; n < blocks.Count; n++)
- {
- if(blocks[n].CustomName.Equals("Decoupler"))
- {
- mergeBlocks.Add(blocks[n] as IMyShipMergeBlock);
- }
- }
- return mergeBlocks;
- }
- List<IMyTimerBlock> getRocketLaunchTimers()
- {
- List<IMyTerminalBlock> blocks = new List<IMyTerminalBlock>();
- GridTerminalSystem.GetBlocksOfType<IMyTimerBlock>(blocks);
- List<IMyTimerBlock> timerBlocks = new List<IMyTimerBlock>();
- for(int n = 0; n < blocks.Count; n++)
- {
- if(blocks[n].CustomName.Equals("RocketLaunch"))
- {
- timerBlocks.Add(blocks[n] as IMyTimerBlock);
- }
- }
- return timerBlocks;
- }
- void launch()
- {
- List<IMyTimerBlock> timerBlocks = getRocketLaunchTimers();
- float delay = 2.0f;
- for(int n = 0; n < timerBlocks.Count; n++)
- {
- timerBlocks[n].TriggerDelay = delay;
- delay += 2.0f;
- timerBlocks[n].ApplyAction("Start");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement