case4
This commit is contained in:
@@ -61,9 +61,12 @@ namespace StudyCase4
|
||||
if (lineRenderer == null)
|
||||
{
|
||||
lineRenderer = gameObject.AddComponent<LineRenderer>();
|
||||
//lineRenderer.material = new Material(Shader.Find("Universal Render Pipeline/2D/Sprite-Unlit-Default"));
|
||||
lineRenderer.material = Resources.Load<Material>("Line");
|
||||
lineRenderer.useWorldSpace = true;
|
||||
}
|
||||
layerMask = LayerMask.GetMask("Item");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㴥<EFBFBD><E3B4A5>
|
||||
Input.multiTouchEnabled = true;
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
@@ -73,7 +76,6 @@ namespace StudyCase4
|
||||
}
|
||||
public void OnMove(InputAction.CallbackContext context)
|
||||
{
|
||||
Debug.Log($"OnMove{context}");
|
||||
if (characterController.isGrounded)
|
||||
moveInput = context.ReadValue<Vector2>();
|
||||
else moveInput = Vector2.zero;
|
||||
@@ -85,6 +87,7 @@ namespace StudyCase4
|
||||
moveDir.y = jumpSpeed;
|
||||
}
|
||||
}
|
||||
//<2F><><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>
|
||||
public void OnZoom(InputAction.CallbackContext context)
|
||||
{
|
||||
float scrollValue = context.ReadValue<float>();
|
||||
@@ -101,7 +104,6 @@ namespace StudyCase4
|
||||
animator.SetBool("Move", true);
|
||||
Quaternion target = Quaternion.LookRotation(new Vector3(moveDir.x, 0, moveDir.z));
|
||||
model.rotation = Quaternion.Slerp(model.rotation, target, turnSpeed * Time.deltaTime);
|
||||
Debug.Log($"Move");
|
||||
}
|
||||
else animator.SetBool("Move", false);
|
||||
if (!characterController.isGrounded)
|
||||
|
||||
Reference in New Issue
Block a user