文章目录 1. 字符串1.1LeetCode151 Reverse Words in a String1.2LeetCode557 Reverse Words in a String III1.3统计字符串字母,数字,空格和其他字符个数1.4把字符串转换成整数1.5回文字符串 2.整数2.1LeetCode7 Reverse Integer2.2判断一个数是不是质数…
算法基础知识总结
Efficient procedures for solving problems on large inputs.
一、基础算法
1、快速排序
1、类别:快速排序是一种 交换排序,冒泡排序也是一种交换排序。
2、原理:将未排序的元素根据一个作为基准的主元(Pi…
目录
1、通过改变物体的位置使物体移动
2、通过给物体施加力使物体移动
3、移动characterController以及碰撞检测 一、相关代码展示
1、通过改变物体的位置使物体移动
using System.Collections;
using System.Collections.Generic;
using UnityEngine;public class move …
Unity点击物体后,移动到物体所在位置
方法一:OnMouse检测(需要Collider组件)
脚本挂在被点击的物体上
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;/// <summary>
/// 缺点…