123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using System.Collections;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- using UnityEngine;
- using UnityEngine.UI;
- public class WindowManager : MonoBehaviour
- {
- [DllImport("__Internal")]
- private static extern void Hello(string str);
- [DllImport("__Internal")]
- private static extern void HelloString(string str);
- [DllImport("__Internal")]
- private static extern float HelloFloat();
- public static WindowManager Instance;
- private void Awake()
- {
- Instance = this;
- }
- public List<GameObject> KangFuDaList;
- public List<GameObject> golist;
- public void show(int index)
- {
- for (int i = 0; i < golist.Count; i++)
- {
- if(i!=index)
- {
- golist[i].SetActive(false);
- }
- }
- golist[index].SetActive(true);
- }
- public void back()
- {
- for (int i = 0; i < golist.Count; i++)
- {
- golist[i].SetActive(false);
- }
- }
- void Start()
- {
- }
- public void webcall()
- {
- Hello("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wxba8be9d5a23ecefb&secret=34aaa3c52f1ce34c291311d01d5851a1");
- // HelloString("This is a string.");
- }
- }
|