29 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using UnityEngine;
using ZXKFramework;
public class AdapterHardware : IAdapter
{
public void Init()
{
switch (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name)
{
case "Main":
Debug.Log("当前操作方式Hardware");
YiLiao.Main.GameManager.Instance.playerManager.Init(OperatingType.Hardware);
break;
case "JingMaiLiuZhiZhen":
{
GameObject canvasObj = YiLiao.JingMaiLiuZhiZhen.GameManager.Instance.transform.FindFirst<Canvas>("Canvas_TouchHardware").gameObject;
canvasObj.SetActive(true);
YiLiao.JingMaiLiuZhiZhen.GameManager.Instance.uiManager.Init(canvasObj, null);
YiLiao.JingMaiLiuZhiZhen.GameManager.Instance.playerManager.Init(OperatingType.Hardware);
YiLiao.JingMaiLiuZhiZhen.GameManager.Instance.interactionManager.Init(OperatingType.Hardware);
}
break;
}
}
}