Exemplo n.º 1
0
        public MyAutoGyro(AutoGyroMode mode, MyGridProgram program, string RC_name)
        {
            Init();
            gyroMode = mode;
            if (program == null)
            {
                return;
            }
            GridTerminalSystem = program.GridTerminalSystem;
            Echo = program.Echo;
            Me   = program.Me;

            List <IMyRemoteControl> RCs = new List <IMyRemoteControl>();

            GridTerminalSystem.GetBlocksOfType(RCs, b => b.CustomName == RC_name);
            if (RCs.Count == 0)
            {
                Echo("No functional remote control blocks found.");
                return;
            }

            RC = RCs.First();

            UpdateGyroList();
        }
Exemplo n.º 2
0
 private void Init()
 {
     GridTerminalSystem = null;
     Echo            = null;
     Me              = null;
     Gyros           = new List <IMyGyro>();
     RC              = null;
     MaxGyroAmount   = 99;
     CTRL_COEFF      = 0.5;
     accuracyDeg     = 0.01f;
     TargetDirection = Vector3.Zero;
     gyroMode        = AutoGyroMode.Forward;
 }