IndieGame/client/Packages/com.unity.inputsystem@1.7.0/Samples~/SimpleMultiplayer/SimpleMultiplayerPlayer.cs

12 lines
364 B
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00
using UnityEngine;
public class SimpleMultiplayerPlayer : MonoBehaviour
{
// Just add *some* kind of movement. The specifics here are not of interest. Serves just to
// demonstrate that the inputs are indeed separate.
public void OnTeleport()
{
transform.position = new Vector3(Random.Range(-75, 75), 0.5f, Random.Range(-75, 75));
}
}