34 lines
697 B
C#
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();
|
|
}
|
|
}
|