本文整理汇总了C#中PointerType类的典型用法代码示例。如果您正苦于以下问题:C# PointerType类的具体用法?C# PointerType怎么用?C# PointerType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PointerType类属于命名空间,在下文中一共展示了PointerType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetPointerPos
public static Vector3 GetPointerPos(PointerType type) {
if (_pointerPosDict.ContainsKey (type)) {
return _pointerPosDict[type];
} else {
return Vector3.zero;
}
}
示例2: SetPointerPos
public static void SetPointerPos(PointerType type, Vector3 pos) {
if (_pointerPosDict.ContainsKey (type)) {
_pointerPosDict [type] = pos;
} else {
_pointerPosDict.Add (type, pos);
}
}
示例3: Screen
public Screen()
{
_pointer = PointerType.DEFAULT;
sb = new SpriteBatch(DCSG.MainObject.GraphicsDevice);
DCSG.OnUpdate += new DCSG.XNAHookEvent(Update);
DCSG.OnDraw += new DCSG.XNADrawEvent(Draw);
}
示例4: PointerDown
internal override bool PointerDown(Microsoft.Xna.Framework.Vector2 position, PointerType pointerType)
{
isPressed = true;
lastPos = position;
return true;
}
示例5: PointerUp
internal override bool PointerUp(Microsoft.Xna.Framework.Vector2 position, PointerType pointerType)
{
isPressed = false;
SelectUnitAt (position);
return true;
}
示例6: Build
public void Build(PointerSettings pSettings, PointerType type) {
_type = type;
_pointerRendererObj = new GameObject ("Renderer");
_pointerRendererObj.transform.SetParent (gameObject.transform, false);
_uiPointer = _pointerRendererObj.AddComponent<UIPointer> ();
_uiPointer.Build (pSettings, _type);
}
示例7: PointerEvent
/// <summary>
/// Initializes a new instance of the <see cref="PointerEvent" /> class.
/// </summary>
/// <param name="pointerId">The pointer id.</param>
/// <param name="position">The position.</param>
/// <param name="deltaPosition">The delta position.</param>
/// <param name="deltaTime">The delta time.</param>
/// <param name="state">The state.</param>
/// <param name="pointerType">Type of the pointer.</param>
/// <param name="isPrimary">if set to <c>true</c> [is primary].</param>
internal PointerEvent(int pointerId, Vector2 position, Vector2 deltaPosition, TimeSpan deltaTime, PointerState state, PointerType pointerType, bool isPrimary)
{
PointerId = pointerId;
Position = position;
DeltaPosition = deltaPosition;
DeltaTime = deltaTime;
State = state;
PointerType = pointerType;
IsPrimary = isPrimary;
}
示例8: PointerUp
internal static bool PointerUp(Microsoft.Xna.Framework.Vector2 position, PointerType pointerType)
{
for (int i = windows.Count - 1; i >= 0; i--)
{
if (!WinWarCS.Util.MathHelper.InsideRect(position, new Rectangle((int)windows[i].X, (int)windows[i].Y, windows[i].Width, windows[i].Height)))
continue;
if (windows[i].PointerUp(position, pointerType))
return true;
}
return false;
}
示例9: PointerDown
internal override bool PointerDown(Microsoft.Xna.Framework.Vector2 position, PointerType pointerType)
{
if (pointerType == PointerType.LeftMouse)
{
isLeftPressed = true;
selectionRectangle.X = position.X;
selectionRectangle.Y = position.Y;
}
if (pointerType == PointerType.RightMouse)
isRightPressed = true;
return true;
}
示例10: CheckInvalidOperators
private void CheckInvalidOperators(Class @class)
{
foreach (var @operator in @class.Operators.Where(o => o.IsGenerated))
{
if (!IsValidOperatorOverload(@operator))
{
Driver.Diagnostics.Debug("Invalid operator overload {0}::{1}",
@class.OriginalName, @operator.OperatorKind);
@operator.ExplicitlyIgnore();
continue;
}
if (@operator.IsNonMemberOperator)
continue;
if (@operator.OperatorKind == CXXOperatorKind.Subscript)
{
CreateIndexer(@class, @operator);
}
else
{
// Handle missing operator parameters
if (@operator.IsStatic)
@operator.Parameters = @operator.Parameters.Skip(1).ToList();
if (@operator.ConversionType.Type == null || @operator.Parameters.Count == 0)
{
var type = new PointerType
{
QualifiedPointee = new QualifiedType(new TagType(@class)),
Modifier = PointerType.TypeModifier.LVReference
};
@operator.Parameters.Insert(0, new Parameter
{
Name = Generator.GeneratedIdentifier("op"),
QualifiedType = new QualifiedType(type),
Kind = ParameterKind.OperatorParameter
});
}
}
}
}
示例11: Build
// Use this for initialization
internal void Build(PointerSettings pSettings, PointerType type) {
_type = type;
_color = pSettings.Color;
_radiusNormal = pSettings.RadiusNormal;
_radiusHighlighted = pSettings.RadiusHighlighted;
_thickness = pSettings.Thickness;
_pointerObj = new GameObject ("Pointer");
_pointerObj.transform.SetParent (gameObject.transform, false);
MeshRenderer meshRenderer = _pointerObj.AddComponent <MeshRenderer> ();
meshRenderer.sharedMaterial = ShortcutUtil.GetMaterial ();
_pointerObj.AddComponent<MeshFilter> ();
_meshBuilder = new MeshBuilder ();
_pointerObj.GetComponent<MeshFilter> ().sharedMesh = _meshBuilder.Mesh;
}
示例12: PointerDown
internal override bool PointerDown(Microsoft.Xna.Framework.Vector2 position, PointerType pointerType)
{
if (pointerType == PointerType.LeftMouse)
{
isLeftPressed = true;
}
if (pointerType == PointerType.RightMouse)
{
isRightPressed = true;
}
bool shouldCenter = isLeftPressed;
if (MapControl.InputHandler.InputMode == InputMode.Classic)
shouldCenter |= isRightPressed;
if (shouldCenter)
{
CenterOnPosition (position);
}
return base.PointerDown (position, pointerType);
}
示例13: HandleDecl
bool HandleDecl(TemplateTypeParameter parameter, PointerDecl p, PointerType r)
{
return r != null &&
r.DeclarationOrExpressionBase is PointerDecl &&
HandleDecl(parameter, p.InnerDeclaration, r.Base);
}
示例14: PointerType
internal PointerType(PointerType.Internal native)
: this(&native)
{
}
示例15: PointerType
private PointerType(PointerType.Internal native)
: this(__CopyValue(native))
{
__ownsNativeInstance = true;
}