本文整理汇总了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!");
}
示例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
}
示例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();
}
示例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;
}
示例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;
}
}
示例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));
}