void Start() { check = DataManager.instance; Fade = GameObject.Find("Fade"); canvas = Fade.GetComponent <CanvasGroup>(); move = RoomMove.instance; }
void Awake() { if (instance != null) { Debug.Log("Invetory instance duplicated!!"); return; } instance = this; }
void Start() { check = DataManager.instance; move = RoomMove.instance; if (check.puzzleList[id]) { this.GetComponent <SpriteRenderer>().sprite = pushed; DoorOpen(); EraseObject(); KeyDrop(); } }
// Start is called before the first frame update void Start() { rmove = GetComponentInParent <RoomMove>(); for (int i = 0; i < 4; i++) { SkyType[i].SetActive(false); } if (rmove.nowTime < 6) { SkyType[0].SetActive(true); srpic.sprite = pictures[Random.Range(1, 20)]; lights[1].SetActive(true); return; } if (rmove.nowTime < 12 && rmove.nowTime > 5) { SkyType[1].SetActive(true); srpic.sprite = pictures[Random.Range(1, 20)]; lights[0].SetActive(true); return; } if (rmove.nowTime < 18 && rmove.nowTime > 11) { SkyType[2].SetActive(true); srpic.sprite = pictures[Random.Range(1, 20)]; lights[0].SetActive(true); return; } if (rmove.nowTime < 24 && rmove.nowTime > 18) { SkyType[3].SetActive(true); srpic.sprite = pictures[Random.Range(1, 20)]; lights[0].SetActive(true); return; } if (rmove.nowTime == 18) { SkyType[3].SetActive(true); srpic.sprite = pictures[0]; lights[0].SetActive(true); return; } }
private void Start() { keysnow = GetComponentInParent <myGM>(); rm = GetComponentInParent <RoomMove>(); for (int i = 0; i < keys.Length; i++) { Debug.LogError(keys[i].Kstruct.needTime + "now: " + rm.nowTime); keysnow.allKeys[i] = keys[i].Kstruct; Debug.LogError(keys[i].Kstruct.needTime + "now: " + rm.nowTime); if (keys[i].Kstruct.needTime == rm.nowTime) { keys[i].Kstruct.influenceNumber = 2; } else { keys[i].Kstruct.influenceNumber = 1; } } }
protected override void Start() { base.Start(); spriteRenderer = GetComponent <SpriteRenderer>(); closedDoorSprite = spriteRenderer.sprite; rm = GetComponent <RoomMove>(); uniqueID = UnityEngine.SceneManagement.SceneManager.GetActiveScene() + name + transform.position; if (InfoManager.Instance.doors.TryGetValue(uniqueID, out DoorType temp)) { OpenBy = temp; if (OpenBy == DoorType.None) { SetDoorType(DoorType.None); } } else { InfoManager.Instance.doors.Add(uniqueID, OpenBy); } }
private void Start() { Rmove = GetComponentInParent <RoomMove>(); }
public void WalkDoor(bool WalkEnable) { walkfromdoor = WalkEnable; Rmove = GetComponentInParent <RoomMove>(); }