public void Setup(GameSetup.LevelList _set, bool _isLocked) { nameLv = _set; Locked = _isLocked; if (nameLv != GameSetup.LevelList.None) { Info = Instantiate(Resources.Load("Tuning/Levels/" + nameLv.ToString())) as LevelInfo; } gameObject.name = _set.ToString(); Locker = FETool.findWithinChildren(gameObject, "Lock").GetComponentInChildren<OTSprite>(); if (Locked == true) { Locker.alpha = 1f; } else { Locker.alpha = 0f; } linkedPlayBtn = GetComponentInChildren<MiscButton>(); }
public void playCurrLvlThumb() { LevelThumbnail _parent = gameObject.transform.parent.gameObject.GetComponent<LevelThumbnail>(); levelToLoad = _parent.Info.LvlName; if (_parent.Locked == false) { StartCoroutine(delayLevelTrigger(levelToLoad.ToString())); } }