using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public partial class PlayerMain : MonoBehaviour { public static PlayerMain Instance {get; private set;} private PlayerInputHandler _input; private Rigidbody2D _rigidbody2D; private void Awake() { if (Instance != null) { Debug.Log(name + " already exist! " + transform); Destroy(gameObject); return; } Instance = this; _input = GetComponent(); _rigidbody2D = GetComponent(); } private void FixedUpdate() { MovementHandler(); } }