Commit ae0dc2f3 authored by lrh's avatar lrh

蒲: 摩擦设置

parent d1a8b2c9
This diff is collapsed.
...@@ -39,13 +39,24 @@ public class PlayerControl : MonoBehaviour ...@@ -39,13 +39,24 @@ public class PlayerControl : MonoBehaviour
if (Input.GetMouseButtonUp(0)) if (Input.GetMouseButtonUp(0))
{ {
mouseUpEnd = Input.mousePosition; mouseUpEnd = Input.mousePosition;
Throw(mouseUpEnd.y - endpoint.y); Throw(mouseUpEnd.y - endpoint.y);
// startpoint = endpoint; // startpoint = endpoint;
} }
this.transform.position = Vector3.MoveTowards(this.transform.position, dir, speed * Time.deltaTime); this.transform.position = Vector3.MoveTowards(this.transform.position, dir, speed * Time.deltaTime);
} }
// void LateUpdate()
//{
// if (Input.GetMouseButton(0))
// {
// if (Time.fixedDeltaTime % 10 == 0)
// {
// GameDebug.Log(mouseUpEnd.y - endpoint.y);
// }
// }
//}
void move(Vector3 dirs) void move(Vector3 dirs)
{ {
float x = -dirs.x; float x = -dirs.x;
......
Build from DESKTOP-P4H38KD at 2021/4/12 18:29:20 Build from DESKTOP-P4H38KD at 2021/4/12 18:49:27
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment