2023-10-30 21:16:40 -04:00

34 lines
697 B
C#

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<PlayerInputHandler>();
_rigidbody2D = GetComponent<Rigidbody2D>();
}
private void FixedUpdate()
{
MovementHandler();
}
}