You've already forked taptap2024_GJ_chidouren
init
This commit is contained in:
26
Assets/Scripts/Game/Component/MapContent.cs
Normal file
26
Assets/Scripts/Game/Component/MapContent.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Game.Component
|
||||
{
|
||||
public class MapContent : MonoBehaviour
|
||||
{
|
||||
public PlayerEntity PlayerEntity;
|
||||
//玩家位置
|
||||
public Vector2 PlayerPosition { private set; get; }
|
||||
|
||||
//全局特殊单例
|
||||
public static MapContent Instance;
|
||||
|
||||
private void Awake ()
|
||||
{
|
||||
//全局特殊单例
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
private void Update ()
|
||||
{
|
||||
this.PlayerPosition = PlayerEntity.transform.position;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user