本文整理汇总了C#中Components.GetJointCoords方法的典型用法代码示例。如果您正苦于以下问题:C# Components.GetJointCoords方法的具体用法?C# Components.GetJointCoords怎么用?C# Components.GetJointCoords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Components
的用法示例。
在下文中一共展示了Components.GetJointCoords方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterComponent
public void RegisterComponent(Components.Component comp)
{
CSComponent c = new CSComponent();
IO.Log.Write(" Adding " + comp.Graphics.GetCSToolTip() + " to ComponentSelector");
c.Texture = ResourceManager.Load<Texture2D>(comp.Graphics.GetIconName());
c.objType = comp.GetType();
c.instance = comp;
c.componentGraphics = comp.Graphics;
c.jointCoords0cw = comp.GetJointCoords(Components.Component.Rotation.cw0);
c.jointCoords90cw = comp.GetJointCoords(Components.Component.Rotation.cw90);
c.jointCoords180cw = comp.GetJointCoords(Components.Component.Rotation.cw180);
c.jointCoords270cw = comp.GetJointCoords(Components.Component.Rotation.cw270);
c.Name = comp.Graphics.GetCSToolTip();
c.IsDragDropPlacement = (comp is Components.Properties.IDragDropPlacable);
/*
if (c.jointCoords0cw.Length % 2 == 1)
c.jointCoords0cw = new int[0];
else
for (int i = 0; i < c.jointCoords0cw.Length; i++)
c.jointCoords0cw[i] = c.jointCoords0cw[i] - Math.Abs(c.jointCoords0cw[i] % 8);
if (c.jointCoords90cw.Length % 2 == 1)
c.jointCoords90cw = new int[0];
else
for (int i = 0; i < c.jointCoords90cw.Length; i++)
c.jointCoords90cw[i] = c.jointCoords90cw[i] - Math.Abs(c.jointCoords90cw[i] % 8);
if (c.jointCoords180cw.Length % 2 == 1)
c.jointCoords180cw = new int[0];
else
for (int i = 0; i < c.jointCoords180cw.Length; i++)
c.jointCoords180cw[i] = c.jointCoords180cw[i] - Math.Abs(c.jointCoords180cw[i] % 8);
if (c.jointCoords270cw.Length % 2 == 1)
c.jointCoords270cw = new int[0];
else
for (int i = 0; i < c.jointCoords270cw.Length; i++)
c.jointCoords270cw[i] = c.jointCoords270cw[i] - Math.Abs(c.jointCoords270cw[i] % 8);//*/
//comp.typeID = (short)components.Count;
Components.ComponentsManager.TypeIDs.Add(comp.GetType(), (short)Components.ComponentsManager.TypeIDs.Count);
components.Add(c);
}