本文整理汇总了C#中IO.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# IO.Equals方法的具体用法?C# IO.Equals怎么用?C# IO.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IO
的用法示例。
在下文中一共展示了IO.Equals方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateWithIOEvent
public override void UpdateWithIOEvent(IO.IOEvent ioEvent)
{
if (ioEvent.Equals(rightMousePress))
{
Vector2 sceenPosition = IOState.MouseScreenPosition();
Company rightClickCompany = this.PlayerObject.ClickCompany(sceenPosition);
if (rightClickCompany != null)
{
new AddTransportVehicleToCompany(this.LocalPlayer, rightClickCompany, vehicle);
this.LocalPlayer.PopUIContext();
new CompanySelected(this.NextInStack, rightClickCompany);
}
}
else if (ioEvent.Equals(leftMousePress))
{
this.LocalPlayer.PopUIContext();
this.UpdateNextInStackIO(ioEvent);
}
else
{
this.UpdateNextInStackIO(ioEvent);
}
}
示例2: UpdateWithIOEvent
public override void UpdateWithIOEvent(IO.IOEvent ioEvent)
{
if (ioEvent.Equals(leftMousePress))
{
Vector2 sceenPosition = IOState.MouseScreenPosition();
Company selectedCompany = this.PlayerObject.ClickCompany(sceenPosition);
if (selectedCompany != null)
{
new CompanySelected(this, selectedCompany);
}
else
{
Vector2 worldPosition = this.Game.Camera.ScreenToWorldPosition(sceenPosition);
List<PhysicalObject> clickList = this.Game.GameObjectCollection.Tree.GetObjectsInCircle(worldPosition, 25f);
if (clickList.Count > 0)
{
if (clickList[0] is Base)
{
new BaseSelected(this, (Base)clickList[0]);
}
else if (clickList[0] is CombatVehicle)
{
CombatVehicle vic = (CombatVehicle)clickList[0];
if ((Company)vic.Company != null)
{
new CompanySelected(this, vic.Company);
}
else
{
new CombatVehicleSelected(this, vic);
}
}
else if (clickList[0] is Transport)
{
Transport vic = (Transport)clickList[0];
if ((Company)vic.Company != null)
{
new CompanySelected(this, vic.Company);
}
else
{
new TransportVehicleSelected(this, vic);
}
}
}
}
}
else if (ioEvent.Equals(createCompany))
{
new CreateCompany(this.LocalPlayer);
}
}
示例3: UpdateWithIOEvent
public override void UpdateWithIOEvent(IO.IOEvent ioEvent)
{
if (ioEvent.Equals(constructCombat))
{
new BuildCombatVehicle(this.LocalPlayer, selectedBase);
}
else if (ioEvent.Equals(constructTransport))
{
new BuildTransport(this.LocalPlayer, selectedBase);
}
else if (ioEvent.Equals(leftMousePress))
{
this.LocalPlayer.PopUIContext();
this.UpdateNextInStackIO(ioEvent);
}
else
{
this.UpdateNextInStackIO(ioEvent);
}
}
示例4: UpdateWithIOEvent
public override void UpdateWithIOEvent(IO.IOEvent ioEvent)
{
if (ioEvent.Equals(rightMousePress))
{
Vector2 sceenPosition = IOState.MouseScreenPosition();
Vector2 worldPosition = this.Game.Camera.ScreenToWorldPosition(sceenPosition);
List<PhysicalObject> clickList = this.Game.GameObjectCollection.Tree.GetObjectsInCircle(worldPosition, 25f);
if (clickList.Count > 0)
{
if (clickList[0] is Base)
{
new SetSupplyPoint(this.LocalPlayer, (Base)clickList[0], this.selectedCompany);
return;
}
}
}
else if (ioEvent.Equals(ctrPress))
{
new SetCompanyPositionsContext(this);
return;
}
else if (ioEvent.Equals(leftMousePress))
{
Vector2 sceenPosition = IOState.MouseScreenPosition();
if (this.PlayerObject.ClickCompanyDelete(sceenPosition, this.selectedCompany))
{
new DeleteCompany(this.LocalPlayer, selectedCompany);
this.LocalPlayer.PopUIContext();
return;
}
Vector2 worldPosition = this.Game.Camera.ScreenToWorldPosition(sceenPosition);
List<PhysicalObject> clickList = this.Game.GameObjectCollection.Tree.GetObjectsInCircle(worldPosition, 25f);
if (clickList.Count > 0)
{
if (clickList[0] is Vehicle && (Company)((Vehicle)clickList[0]).Company == this.selectedCompany)
{
this.LocalPlayer.PopUIContext();
if (clickList[0] is CombatVehicle)
{
new CombatVehicleSelected(this.NextInStack, (CombatVehicle)clickList[0]);
}
else if(clickList[0] is Transport)
{
new TransportVehicleSelected(this.NextInStack, (Transport)clickList[0]);
}
return;
}
}
this.LocalPlayer.PopUIContext();
this.UpdateNextInStackIO(ioEvent);
}
else
{
this.UpdateNextInStackIO(ioEvent);
}
}