Roman f9ab978fc6 1.完成移动功能,手柄摇杆左右控制左右,键盘AD控左右
2.完成跑动功能,手柄RB控制跑动,键盘Shift控制跑动
3.完成交互功能,手柄X与物体交互,键盘F与物体交互
4.完成打码功能,手柄RT短按打.,长按打-,键盘忘了适配
2021-07-01 23:35:25 +08:00

45 lines
813 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Interactive : MonoBehaviour
{
// Start is called before the first frame update
public GameObject m_interface;
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void OnTriggerEnter2D(Collider2D other)
{
if(other.tag == "Player")
{
other.GetComponent<M_Player>().catched = this;
}
}
void OnTriggerExit2D(Collider2D other)
{
if(other.tag == "Player")
{
other.GetComponent<M_Player>().catched = null;
}
}
public void ShowInfo()
{
m_interface.SetActive(true);
}
public virtual void Coding(string temp){}
}