- 博客(6)
- 收藏
- 关注
原创 RTS相机+边框限制
https://github.com/smartgrass/RTSCamera调用CameraRig中的PanCamera(Vector3 panDelta)方法即可移动相机示例代码就写在RSTCamera.cs里了(使用wasd输入)使用时 CameraRig 和RSTCamera 挂载在相机上相机下需要挂载一个空物体,位置角度都为0CameraRigEditor记得放在Editor文件内边框限制:点相机,然后就可以在Scene窗口直接调矩形大小原理不需要懂,用就完事了()最终效果
2021-02-15 19:11:11
376
原创 Unity-RTS平移相机
实现相机平移功能查了很久的csdn没找到合适,最终自己写了一个using System.Collections;using System.Collections.Generic;using UnityEngine;public class RSTCamera : MonoBehaviour { public float HorSpeed = 10f;//移动速度 public float VerSpeed = 10f;//垂直移速 private Transfor
2021-02-15 01:22:18
628
转载 Unity 特性(Attribute)总览 (转)
转发相当于我会了https://blog.youkuaiyun.com/l773575310/article/details/71698746
2021-01-23 10:59:37
237
转载 Unity NaughtyAttributes--InInspector编辑器插件
安装方式1.github https://github.com/dbrizov/NaughtyAttributes2. AssetStore https://assetstore.unity.com/packages/tools/utilities/naughtyattributes-129996常用特性用法展示Reorderablelist 数组可重排public class NaughtyComponent : MonoBehaviour{ [ReorderableList] publ
2020-11-27 18:23:44
647
原创 C++二叉树基础 12.30
二叉树结构:struct TreeNode {int val;TreeNode *left;TreeNode *right;TreeNode(int x) : val(x), left(NULL), right(NULL) {}};二叉树的遍历方式:前序序列:根左右 (递归中常用到)中序序列:左根右后序序列:左右根算法相关:(ps:原设定,一棵树只有一个节点或没有节点,它的深度都为0,而这里对于空节点的深度设定为-1,只有一个节点深度设为0)1.计算二叉树深度int height
2020-05-26 22:34:51
355
原创 Android/java 数组和List和ListArray的简单使用
//数组string[] s=new string[3];s[0]="a"; s[1]="b"; s[2]="c";//ListList<int> list = new List<int>();list.Add(123);//新增数据list[0] = 345;//修改数据 list.RemoveAt(0);//移除数据//ArrayListArray...
2019-11-24 11:24:28
686
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人