当前位置: 首页>>代码示例>>C#>>正文


C# PartModule.Equals方法代码示例

本文整理汇总了C#中PartModule.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# PartModule.Equals方法的具体用法?C# PartModule.Equals怎么用?C# PartModule.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PartModule的用法示例。


在下文中一共展示了PartModule.Equals方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnStart

 //rect initialized here
 public override void OnStart(PartModule.StartState state)
 {
     base.OnStart(state);
     if(state.Equals(PartModule.StartState.Editor)) return;//don't start anything in the editor
     if (state.Equals(PartModule.StartState.PreLaunch)) return;//I think starting in prelaunch will fuck things up. Not sure though.
     print("initialising progCom..."+state.ToString());
     if ((windowPos.x == 0) && (windowPos.y == 0))//windowPos is used to position the GUI window, lets set it in the center of the screen
     {
         windowPos = new Rect(Screen.width / 2, Screen.height / 2, 100, 100);
     }
     init();
     //vessel.OnFlyByWire += new FlightInputCallback(performManouvers);
     //RenderingManager.AddToPostDrawQueue(3, new Callback(drawGUI));//start the GUI
     onFlightStart();
     print("Hello, World!");
     consoleWrite("Computer online!");
 }
开发者ID:Binamrad,项目名称:ProgCom,代码行数:18,代码来源:ProgCom.cs

示例2: OnStart

	public override void OnStart(PartModule.StartState state)
	{
		if(this.installtime == 0.0 && state.Equals(PartModule.StartState.PreLaunch))
		{
			//if we haven't installed the part yet, we set the installtime to current game time
			this.installtime = (double)Planetarium.GetUniversalTime ();
		}	

		//Get the number of years from the half-life by dividing # of seconds in a year.
		HalfYears = (float)(HalfLife / 9203400.0); //Kerbin year
		//HalfYears = (float)(HalfLife / 31540000.0);  //earth year

	}
开发者ID:thinkyfish,项目名称:ThermoElectricGenerator,代码行数:13,代码来源:ThermoNuclearGenerator.cs

示例3: OnStart

        public override void OnStart(PartModule.StartState state)
        {
            base.OnStart(state);
            if (state.Equals(PartModule.StartState.Editor)) return;//don't start stuff in the editor
            windowID = Util.random();
            mem = new Int32[4626];
            pointer = 530;
            charSetPtr = 18;
            colorPointer = 2;
            modePtr = 1;
            scrollPointer = 0;
            colors = new Color32[16];
            for (int i = 0; i < 16; ++i) {
                colors[i] = new Color32();
                colors[i].a = 255;
            }

            imageBuffer = new Color32[256*256];
            image = new Texture2D(256, 256, TextureFormat.ARGB32, false);
            image.filterMode = FilterMode.Point;
            windowPos = new Rect();
            if ((windowPos.x == 0) && (windowPos.y == 0))//windowPos is used to position the GUI window, lets set it in the center of the screen
            {
                windowPos = new Rect(Screen.width / 2, Screen.height / 2, 100, 100);
            }
            //Set all the pixels to black. If you don't do this the image contains random junk.
            for (int y = 0; y < image.height; y++) {
                for (int x = 0; x < image.width; x++) {
                    image.SetPixel(x, y, Color.black);
                }
            }
            image.Apply();

            //init monitor drawing
            RenderingManager.AddToPostDrawQueue(3, new Callback(draw));

            //initialise fonts and colors and things
            //init default values in memory
            int index = charSetPtr;
            foreach (UInt32 font in getDefaultFont()) {
                mem[index] = (Int32)font;
                ++index;
            }
            index = colorPointer;
            foreach (Int32 col in getDefaultColors()) {
                mem[index] = col;
                ++index;
            }
            updateColors();
        }
开发者ID:Binamrad,项目名称:ProgCom,代码行数:50,代码来源:Monitor.cs

示例4: OnStart

 public override void OnStart(PartModule.StartState state)
 {
     base.OnStart(state);
     if (state.Equals(PartModule.StartState.Editor)) return;//don't start stuff in the editor
     vessel.OnFlyByWire += updateState;
 }
开发者ID:Binamrad,项目名称:ProgCom,代码行数:6,代码来源:PCPlayerCtrlListener.cs

示例5: OnStart

 public override void OnStart(PartModule.StartState state)
 {
     base.OnStart(state);
     if (state.Equals(StartState.Editor))
     {
         Events["chooseEquipment"].active = true;
     }
     else
     {
         Events["chooseEquipment"].active = false;
     }
 }
开发者ID:N3h3miah,项目名称:OrbitalMaterialScience,代码行数:12,代码来源:EquipmentRackContainer.cs

示例6: OnStart

 //**************************************************************
 public override void OnStart(PartModule.StartState state)
 {
     base.OnStart(state);
     if (state.Equals(PartModule.StartState.Editor)) return;//don't start stuff in the editor
     windowPos = new Rect();
     if ((windowPos.x == 0) && (windowPos.y == 0))//windowPos is used to position the GUI window, lets set it in the center of the screen
     {
         windowPos = new Rect(Screen.width / 2, Screen.height / 2, 100, 100);
     }
     RenderingManager.AddToPostDrawQueue(3, new Callback(draw));
 }
开发者ID:Binamrad,项目名称:ProgCom,代码行数:12,代码来源:TapeDrive.cs


注:本文中的PartModule.Equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。