// Start is called before the first frame update void Start() { box = GetComponent <ObjectReference>(); tc = GetComponent <TouchControl>(); sc = GetComponent <SpecialController>(); randomMap = MakeArray(Options.width, Options.height); selectedBoxes = new GameObject[Options.width * Options.height]; selections = new GameObject[Options.width * Options.height]; map = new GameObject[Options.width, Options.height]; SetBoxes(); SetSelection(); }
private void Awake() { if (instance == null) { instance = this; } player[0] = GameObject.Find("Player").GetComponent <GamePlayerManager>(); player[1] = GameObject.Find("Enemy").GetComponent <GamePlayerManager>(); uiManager = GameObject.Find("Canvas").GetComponent <UIManager>(); handTransform = GameObject.Find("Hand").transform; for (int i = 0; i < 3; i++) { mixFieldTransform[i] = GameObject.Find("MixField_" + i.ToString()).transform; } //cookingObject = GameObject.Find("Cooking"); cookFieldTransform = GameObject.Find("CookField").transform; uiManager.cookingObject.SetActive(false); eatFieldTransform = GameObject.Find("EatField").transform; //messagePanel = GameObject.Find("MessagePanel"); //uiManager.messagePanel.SetActive(false); specialController = GameObject.Find("SpecialController").GetComponent <SpecialController>(); selectController = GameObject.Find("SelectController").GetComponent <SelectController>(); messageController = GameObject.Find("MessageController").GetComponent <MessageController>(); cardGenerator = GameObject.Find("CardGenerator").GetComponent <CardGenerator>(); attackButtons = GameObject.Find("AttackButtons"); playerID = PhotonNetwork.LocalPlayer.ActorNumber; //IDを1つ減らして扱う playerID--; defaultMaxHand = maxHand; handCount = 0; for (int i = 0; i < 2; i++) { playerHp[i] = player[i].hp; } rareDraw = false; }
public SpecialController() { Instance = this; }