目录:
1.正弦曲线:
private float get_Sin_Z_Value(float x)
{
float ZQ; //周期
float inner = (2 * (float)Mathf.PI) / ZQ; //角速度
float ya = (float)Mathf.Sin(inner * x);
float maall = swing_len * 0.5f; //swing_len是振幅
float middle = maall - swing_len / 2;
return (middle + maall * ya);
}
2.DOTween 插值渐变
3.untiy 对手柄的适配
4. 获取每一个按键的名称
using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine;
public class PlayerJoystickClass : MonoBehaviour {
private string currentButton;//当前按下的按键
// Use this for initialization
void Start () {
}
string[] names = {"LL", "L