随笔分类 -  程序开发

摘要:```C# using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(SpriteRenderer))] public class SpriteFul 阅读全文
posted @ 2023-08-27 15:08 dewxin 阅读(663) 评论(0) 推荐(0)
摘要:.netframework的Bitmap类返回的pixel中[alpha的值恒为255]( https://bytes.com/topic/net/answers/752980-how-do-i-get-bitmap-getpixel-not-return-alpha-value),因此需要自己读取 阅读全文
posted @ 2023-08-08 19:22 dewxin 阅读(154) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/Cy_coding/article/details/111048077 unity中我们普遍使用的是碰撞器来实现各个物体的碰撞体积,例如Box collider, Sphere Collider。 在实现游戏的过程中,如果不想要物体与特定物体产生碰撞,或反 阅读全文
posted @ 2023-08-05 15:59 dewxin 阅读(568) 评论(0) 推荐(0)
摘要:https://gwb.tencent.com/community/detail/109177 FPS游戏服务器设计的问题 转 3.3k浏览 一、追溯 去gameloft笔试,有一个题目是说: 叫你去设计一个FPS(第一人称射击游戏),你是要用TCP呢还是要用UDP,说明理由 。二、学习 这是两篇网 阅读全文
posted @ 2023-08-05 14:58 dewxin 阅读(181) 评论(0) 推荐(0)
摘要:不知道“增益道具”在英文里该怎么说,百度翻译是GainProp,感觉怪怪的。于是用ChatGPT问了一下。 我: >in a game, something that can buff the player, what is it GPT: >In a game, a "buff" typicall 阅读全文
posted @ 2023-07-28 20:26 dewxin 阅读(90) 评论(0) 推荐(0)
摘要:### 动机 由于地图是使用unity tilemap编辑的,服务端也希望获取一份相关的信息。**相较于自己写个编辑器,直接利用unity的能力会更加敏捷**。 ### 效果展示 只需要将组件拖拽到含有Tilemap组件的GameObj上面,就可以点击按钮,获取格子信息。 ![](https://i 阅读全文
posted @ 2023-07-22 14:44 dewxin 阅读(845) 评论(0) 推荐(0)
摘要:https://stackoverflow.com/questions/10196897/memorymappedfile-createoropen-throws-the-handle-is-invalid C# mutex的名字和 MemoryMappedFile名字不能一样。。 可能是底层用到了 阅读全文
posted @ 2023-07-12 16:33 dewxin 阅读(58) 评论(1) 推荐(1)
摘要:[内存映射文件(Memory-mapped files)](https://learn.microsoft.com/en-us/dotnet/standard/io/memory-mapped-files)是一种很好的进程间通信方式,它暴露了底层的细节,具有很强的扩展性以及性能。 ![](https 阅读全文
posted @ 2023-07-10 22:10 dewxin 阅读(594) 评论(0) 推荐(0)
摘要:### 问题展示以及源码 ![](https://img2023.cnblogs.com/blog/2243042/202307/2243042-20230707212750099-1036685882.gif) ```C# using System.Collections; using Syste 阅读全文
posted @ 2023-07-07 22:34 dewxin 阅读(61) 评论(0) 推荐(0)
摘要:### 起因 C#函数中没有显示native线程id的,只能显示managedThreadId,如果想显示nativeThreadId就需要通过[PInvoke](https://learn.microsoft.com/zh-cn/dotnet/standard/native-interop/pin 阅读全文
posted @ 2023-07-03 13:06 dewxin 阅读(50) 评论(0) 推荐(0)
摘要:https://github.com/dotnet/sdk/issues/16975 >6bee commented on Apr 1 > adding the following PropertyGroup to the .pubxml seems to have solved the issue 阅读全文
posted @ 2023-07-02 00:08 dewxin 阅读(158) 评论(0) 推荐(0)
摘要:```C# public static bool TryGetLocalEndPoint(out IPEndPoint ipEndPoint) { try { string localIP = string.Empty; using (Socket socket = new Socket(Addre 阅读全文
posted @ 2023-06-30 23:43 dewxin 阅读(114) 评论(0) 推荐(0)
摘要:转发自 https://www.cnblogs.com/walterlv/p/10236378.html `CommandLineParser` 是一款用于解析命令行参数的 NuGet 包。你只需要关注你的业务,而命令行解析只需要极少量的配置代码。 本文将介绍如何使用 `CommandLinePar 阅读全文
posted @ 2023-06-20 21:50 dewxin 阅读(438) 评论(0) 推荐(0)
摘要:https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-build >-v|--verbosity >Sets the verbosity level of the command. Allowed values are q[uiet], 阅读全文
posted @ 2023-06-19 15:17 dewxin 阅读(62) 评论(0) 推荐(0)
摘要:### 问题 对于泛型类`List`,如果调用`type.FullName`和`type.Name`会分别返回下面的内容。 ```C# //type.FullName System.Collections.Generic.List`1[[System.Int32, mscorlib, Version 阅读全文
posted @ 2023-06-14 14:08 dewxin 阅读(510) 评论(0) 推荐(0)
摘要:[toc] 源视频教程地址为[Youtube](https://www.youtube.com/watch?v=pZ45O2hg_30) ### 什么是Unity工具开发程序员 工具开发程序员目标客户是项目组里其他成员,它们创造出unity原本没有的功能,优化项目的流程。并且你只需要会C#就能搞定这 阅读全文
posted @ 2023-05-24 19:41 dewxin 阅读(213) 评论(0) 推荐(0)
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(SpriteRenderer))] public class SpriteAnimator 阅读全文
posted @ 2023-05-13 16:03 dewxin 阅读(55) 评论(0) 推荐(0)
摘要:unity中最小的网格就是1unit。1unit默认是1米。 1 Unity unit = 1 meter (100cm) 对于一个16*16像素的图片,如果我们将其Pixels Per Unit设置为16,那么这张图片的长宽都是1unit。在unity中刚好契合最小的格子。 阅读全文
posted @ 2023-05-09 16:35 dewxin 阅读(287) 评论(0) 推荐(0)