本文整理汇总了C#中System.Vector3.PackHSVToUint方法的典型用法代码示例。如果您正苦于以下问题:C# Vector3.PackHSVToUint方法的具体用法?C# Vector3.PackHSVToUint怎么用?C# Vector3.PackHSVToUint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Vector3
的用法示例。
在下文中一共展示了Vector3.PackHSVToUint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildBlocks
public void BuildBlocks(Vector3 colorMaskHsv, HashSet<MyCubeGrid.MyBlockLocation> locations, long builderEntityId)
{
var msg = new BuildBlocksMsg();
msg.GridEntityId = Entity.EntityId;
msg.Locations = locations;
msg.ColorMaskHsv = colorMaskHsv.PackHSVToUint();
msg.BuilderEntityId = builderEntityId;
Sync.Layer.SendMessageToServer(ref msg);
}
示例2: ColorBlocks
public void ColorBlocks(Vector3I min, Vector3I max, Vector3 newHSV, bool playSound)
{
var msg = new ColorBlocksMsg();
msg.GridEntityId = Entity.EntityId;
msg.HSV = newHSV.PackHSVToUint();
msg.Min = min;
msg.Max = max;
msg.PlaySound = playSound;
Sync.Layer.SendMessageToServer(ref msg);
}
示例3: BuildBlock
//interface IBlockMessage : IEntityMessage
//{
// Vector3I GetBlockPosition();
//}
//delegate void BlockMessageCallback<TBlock, TMsg>(TBlock block, ref TMsg message, MyPlayer sender)
// where TBlock : MyCubeBlock
// where TMsg : struct, IBlockMessage;
//class MyCallback<TBlock, TMsg> : MySyncLayer.MyCallbackBase<TMsg>
// where TBlock : MyCubeBlock
// where TMsg : struct, IBlockMessage
//{
// public readonly BlockMessageCallback<TBlock, TMsg> Callback;
// public MyCallback(MySyncLayer layer, BlockMessageCallback<TBlock, TMsg> callback, MyMessagePermissions permission, ISerializer<TMsg> serializer)
// : base(layer, permission, serializer)
// {
// Callback = callback;
// }
// protected override void OnHandle(ref TMsg msg, MyPlayer player)
// {
// MySyncGrid sync = Layer.GetSyncEntity<MySyncGrid, TMsg>(msg.GetEntityId());
// if (sync != null)
// {
// var block = sync.Entity.GetBlock(msg.GetBlockPosition());
// if (block != null)
// {
// var fatBlock = block.FatBlock as TBlock;
// if (fatBlock != null)
// {
// Callback(fatBlock, ref msg, player);
// }
// }
// }
// }
//}
public void BuildBlock(Vector3 colorMaskHsv, MyCubeGrid.MyBlockLocation location, MyObjectBuilder_CubeBlock blockObjectBuilder, long builderEntityId)
{
var msg = new BuildBlockMsg();
msg.GridEntityId = Entity.EntityId;
msg.Location = location;
msg.ColorMaskHsv = colorMaskHsv.PackHSVToUint();
msg.BlockObjectBuilder = blockObjectBuilder;
msg.BuilderEntityId = builderEntityId;
Sync.Layer.SendMessageToServer(ref msg);
}