当前位置: 首页>>代码示例>>C#>>正文


C# Vector3.PackHSVToUint方法代码示例

本文整理汇总了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);
 }
开发者ID:Krulac,项目名称:SpaceEngineers,代码行数:9,代码来源:MySyncGrid.cs

示例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);
        }
开发者ID:Krulac,项目名称:SpaceEngineers,代码行数:11,代码来源:MySyncGrid.cs

示例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);
        }
开发者ID:Krulac,项目名称:SpaceEngineers,代码行数:49,代码来源:MySyncGrid.cs


注:本文中的System.Vector3.PackHSVToUint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。