自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(89)
  • 资源 (4)
  • 收藏
  • 关注

原创 LitJson解析 生成json文件 读取json文件中的字典

//存数据的类//数据类//保存本地json文件 读取json文件 单一数据 字典数据

2022-06-29 10:12:41 854 1

原创 横竖屏切换对应UI界面显示逻辑

void Update() { OnScreenChange();//调用屏幕切换方法 } /// <summary> /// 根据屏幕高宽比得出横竖屏幕 显示对应UI /// </summary> private void OnScreenChange() { float height = Screen.height; float width = Screen.width;

2022-04-25 18:00:18 589

原创 3D碰撞器物体旋转相机透视模式

//相机 透视模式void Update() { OnPos();//跟随旋转 } private void OnPos()//射线选中 { if (Input.GetMouseButton(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit;

2022-04-24 10:33:10 132

原创 3D碰撞器跟随鼠标旋转像机正交模式

//摄像机改为正交模式 void Update() { OnPos(); } private void OnPos()//射线选中 { if (Input.GetMouseButton(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit;

2022-04-23 17:03:11 444

原创 2D物体跟随鼠标旋转像机正交模式

//摄像机选择正交模式 private void OnPos()//射线选中 { if (Input.GetMouseButton(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); //2D射线碰撞检测 //RaycastHit2D hit = Physics2D.Raycast(Camera.main.ScreenT

2022-04-23 15:52:30 291

原创 关于资源UI特效unityUGUI

unity_UGUI特效讲解 如有需要5积分即可下载

2021-12-17 10:09:02 822

原创 MySQL与网络通讯

什么是数据库?可以理解为Excel就是一个数据表 利于人操作MySQL是数据库,便于程序操作,便于存储百万以上级别的数据基本操作为:增删改查分为:1.Web Application Server(网页服务器) 2.Game Server(游戏服务器)命令行学习:show databases;(显示所有数据库)creata database tableName(创建数据库)create table tableName(row_Name dataType,row_Name dataType,pr

2021-10-13 15:06:49 164

原创 MySQL笔记2

显示所有数据库:show databases;创建数据库:create database 数据库名;删除数据库:drop database 数据库名;对数据库进行操作:use 数据库名字;显示该数据库下的表:show tables;创建表:create table tablename(id int auto_increment,username varchar(30),primary key(id));查看表结构:desc tablename;删除表中指定id元素: delete from s

2021-10-13 15:05:26 105

原创 数据库MySql笔记

数据库—创建新表设置新表的名字及其数据设置完成后Apply保存主键(Primary Ke y)1,每行数据独一无二的标识2,一个表必须有主键(只能有一个主键)3,不能为NULL(空值)4,由一列(不能为空)或者多列组成(其中一个不为空)Unique Key1,表示该项数据不能重复2,允许为NULL查看数据重新设置/更改表外键关联设置show databases;查询所有表use resource_datas;操作目标表show tables;查询表内所有数据cr

2021-10-13 14:34:12 123

原创 C#截取操作

字符串截取(单个标识符) string st = "str_ing_123"; string[] st01 = st.Split('_'); Debug.Log("st01[0]=" + st01[0]);//st01[0]=str Debug.Log("st01[1]=" + st01[1]);//st01[1]=ing Debug.Log("st01[2]=" + st01[2]);//st01[2]=123字符串截取(多个

2021-10-12 16:27:33 424

原创 UGUI文字处理

shadow组件具有阴影效果outline具有描边加粗效果

2021-09-23 16:47:09 81

原创 Socket通讯客户端

using System.Collections;using System.Collections.Generic;using System.Net;using System.Net.Sockets;using UnityEngine;public class SocketClient{ public SocketClient() { Init();//在一个C#生命周期的Start进行New 另外控制台启动服务器 } public void

2021-09-09 09:58:34 121

原创 Socket通讯服务器端

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Threading.Tasks;using System.Net.Sockets;using System.Net;namespace ChatServer{ class SocketServer { private Thr

2021-09-09 09:53:52 200

原创 编辑器状态下自动关机代码

using System.Collections;using System.Collections.Generic;using System.IO;using UnityEditor;using UnityEngine;public class ShutDown: MonoBehaviour { private static bool bis=true ; static ShutDown() { EditorApplication.update +.

2021-07-23 14:31:08 127

原创 单例模式(设计模式)

单例模式—保证一个类仅有一个实例,并提供一个访问他的全局访问点别的类调用 Singleton.Getsimg().即可懒汉模式 用到时实例对象using System;using System.Collections.Generic;using System.Text;using System.Threading;namespace 单例模式{ class Singleton { private static Singleton isntance;

2021-06-28 19:50:51 98

原创 工厂模式(计算器)

工厂模式相对于简单工厂模式更方便扩展 另外对于实例变化修改更方便也更安全(无switch进行判断) 扩展只需要一个类重写父类方法 一个类继承接口返回对应方法首先封装字段 并创建虚方法using System;using System.Collections.Generic;using System.Text;namespace 工厂模式计算器{ interface IProduct//此接口就是后面代理公司调用对应实例的方法 { CalculatorProd

2021-06-28 19:35:37 289

原创 工厂模式(设计模式)

创建一个接口interface IProduct{ Product GetProduct();}//生产线类 Ausing System;using System.Collections.Generic;using System.Text;namespace 简单工厂模式{ class ConcreteProductA : Product { public override void Method1() {

2021-06-07 15:42:16 64

原创 简单工厂模式

(此例是控制台逻辑 生命周期调用简单修改即可)创建一个抽象类,子类继承并重写using System;using System.Collections.Generic;using System.Text;namespace 简单工厂模式{ abstract class Product { public abstract void Method1(); }}子类A 生产钢笔using System;using System.Collection

2021-06-07 15:28:26 74

原创 数据结构---队列

interface IQueue<T> { int GetLength(); bool IsEmpty(); void Clear(); void In(T item); T Out(); T GetFront(); } class Node<T> { private T data; private Node<T&gt..

2021-05-25 16:26:20 67

原创 数据结构-------二叉树

class Node<T> { private T data; private Node<T> IChild; private Node<T> rChild; public T Data { get { return data; } set { data = value; } } public Node..

2021-05-25 16:24:01 115

原创 数据结构-----栈

interface IStack<T> { int GetLength(); //获取长度 bool IsEmpty();//是否为空 void Clear();//清空 void Push(T item);//添加 T Pop();//删除头数据 T GetTop();//取出头数据 } public class Node<T> { pr..

2021-05-25 16:19:23 58

原创 数据结构----串

using System;using System.Collections.Generic;using System.Globalization;using System.Text;namespace 串{ class StringDS { private char[] data; public StringDS(char[] array) { data = new char[array.Length];

2021-05-25 16:13:42 70

原创 数据结构(线性结构,单链表,双链表)

//接口 interface IListDS<T> { int GetLength();//获取长度 void Clear();//清空 bool IsEmpty();//判断列表是否为空 void Append(T item);//添加数据 void Insert(T item,int i);//在某个位置添加数据 T Delete(int i);//根据位置删除数据

2021-05-25 16:11:39 77

原创 Unity 动画笔记

链接:https://pan.baidu.com/s/1VOuBQP7Ii7wP_ElwQPtWUg提取码:6666些微内容Legacy:旧版动画类型旧版动画使用 Unity 4.0 版本前推出的动画系统。一般动画仍可由 Mecanim 系统导入,但无法使用人形动画的专有功能。Generic:一般动画类型非人形动画的使用方法是:在 Assets 文件夹中选中模型文件,在 Inspector 视图中的 Import Settings 属性面板中选择 Rig 标签页,单击 Animation Typ

2021-05-19 12:10:12 121

原创 C#基础

一,C#解释C#是微软公司发布的一种面向对象的、运行于.NET Framework之上的高级程序设计语言。并定于在微软职业开发者论坛(PDC)上登台亮相。C#是一种安全的、稳定的、简单的、优雅的,由C和C++衍生出来的面向对象的编程语言。它在继承C和C++强大功能的同时去掉了一些它们的复杂特性(例如没有宏以及不允许多重继承)。C#综合了VB简单的可视化操作和C++的高运行效率,以其强大的操作能力、优雅的语法风格、创新的语言特性和便捷的面向组件编程的支持成为.NET开发的首选语言。二,unity开发和V

2021-05-19 12:00:18 607

原创 测试时间简易版

DateTime begintime = DateTime.Now; //此处写一个代码逻辑 DateTime endtime = DateTime.Now; TimeSpan oTime = endtime.Subtract(begintime); //Console.WriteLine("运行时间为{0}秒",oTime.TotalSeconds);//输出秒 Consol...

2021-05-11 15:19:41 90

原创 颜色闪烁

using System.Collections; using System.Collections.Generic; using UnityEngine;public class Mpingpong : MonoBehaviour{Material material1;Material material2;public float dunation = 1.0f;void Start() { material1 = Resources.Load("A") as Mater.

2021-04-26 10:57:59 96

原创 异步跳转(跳转间接)------枚举在要跳转的Button中设置并跳转到缓冲场景

using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.SceneManagement;using UnityEngine.UI; public enum Scenetype { Login,//开始场景 Main//战斗场景 } public class UILoadingView : MonoBehaviour {public st

2021-03-27 12:01:40 139

原创 物体跟随鼠标移动(层级)

using System.Collections; using System.Collections.Generic; using UnityEngine; public class moseposion : MonoBehaviour { private void OnMouseDrag()//Unity:当用户在GUIElement或碰撞器上单 击 鼠标并保持按住鼠标时调用OnMouseDrag { OnCube(); }public L.

2021-03-26 15:52:54 176

原创 动画系统

using System.Collections;using System.Collections.Generic;using UnityEngine;public class CubeAnimation : MonoBehaviour{private Animator animator;//Animator.StringToHash(""); 字符串输入动画判断条件的变量名字private int isPlayID = Animator.StringToHash("bisplay")

2020-12-28 10:54:13 110

原创 Xml创建

using System.IO; using System.Xml;//两个引用 public void XmlCreat() { string filepath = Application.dataPath+"/Xmls/myxmi.xml";//创建路径 if (!File.Exists (filepath))//判断文件是否存在 { XmlDocument xmlDoc = new XmlDocument();//创建xml对象

2020-12-09 11:38:41 214

原创 小地图另一种制作方法(需计算)

using System.Collections;using System.Collections.Generic;using UnityEngine;public class myMove : MonoBehaviour{[SerializeField ]private RectTransform imgmap; //小地图中可视的目标(小红点/小绿点)void Start(){ }void Update(){ OnMove(); floa.

2020-12-02 16:00:29 292 1

原创 unity 小地图源码(无需计算)

using System.Collections; using System.Collections.Generic; using UnityEngine; public class map_smaller : MonoBehaviour{public RectTransform mapBackground;//小地图图片public RectTransform img_main;//要移动的小目标public Transform target01;//地图左上public Trans.

2020-12-02 14:54:24 211

原创 子弹处理

using System.Collections; using System.Collections.Generic; using UnityEngine;public class bullet : MonoBehaviour{ public int damage = 1;//伤害public float speed = 60;//移送速度private Transform target;//目标public GameObject explosionEffectPrefab;//子弹预制.

2020-11-13 08:38:11 123

原创 滑动视图动态加载Scroll View组件

using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.EventSystems;using UnityEngine.UI; public class ScrollView { public GameObject Item;//Scroll View组件 Content下的子物体 public Transform Content;///Scr

2020-11-05 13:55:06 329

原创 子弹操作

using System.Collections;using System.Collections.Generic; using UnityEngine; public class bullet : MonoBehaviour{ public int damage = 1;//伤害public float speed = 60;//移送速度private Transform target;//目标public GameObject explosionEffectPrefab;//子弹预制体

2020-11-05 08:54:02 145

原创 游戏摄像机操作

using System.Collections;using System.Collections.Generic; using UnityEngine; public class CameraView : MonoBehaviour {public float speed = 1;//WASD视角移动的速度public float mouseSpeed = 60; //滚轮滑动视角上下移动的速度void Start(){ }void Update(){ fl.

2020-11-04 08:54:40 241

原创 摄像机的三种模式

**一Screen Space-Overlay(屏幕控件-覆盖模式)**画布会填满整个屏幕空间,并将画布下面的所有的UI元素置于屏幕的最上层,或者说画布的画面永远“覆盖”其他普通的3D画面,如果屏幕尺寸被改变,画布将自动改变尺寸来匹配屏幕Screen Space-Overlay模式的画布有Pixel Perfect和Sort Layer两个参数:  (1)Pixel Perfect:只有RenderMode为Screen类型时才有的选项。使UI元素像素对应,效果就是边缘清晰不模糊。  (2)Sor

2020-09-28 09:04:26 2781

原创 CharacterController官方注释

Character Controller API官方注释:A CharacterController allows you to easily do movement constrained by collisions without having to deal with a rigidbody.也就是说,角色控制器自带的移动函数包含了碰撞体,不用再让我们自己设置刚体和碰撞体了.这个组件...

2020-05-07 17:19:34 480

原创 CharacterController角色控制器的移动方法

using System.Collections;using System.Collections.Generic; using UnityEngine; public class MainPlayerCtrolter : MonoBehaviour { void Update () { // OnMove(); ...

2020-05-07 17:19:09 873

Unity3DTraining-master.zip

适宜零基础,想提升编程的人群,语言为C#语言,涵盖unity的多种demo案例, 插件,面试问题大总结系基础,加强,优化等丰富内容

2021-12-24

UIEffect.zip

让我们用效果来装饰你的UI吧!可以根据脚本和检查器来控制参数达到想要的效果。

2021-12-17

数据库操作笔记.docx

数据库详解,包括认识数据库,进入数据库,数据库操作

2021-10-13

seka.unitypackage

色卡,五个颜色的暖色色卡

2021-10-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除