// Start is called before the first frame update void Start() { uImanager = FindObjectOfType <UImanager>(); respawnui = FindObjectOfType <RespawnUI>(); playerPos = Player.transform.position; anim = GetComponent <Animator>(); }
// Use this for initialization public void Setup() { GameEventManager.GameStart += GameStart; GameEventManager.EndGame += EndGame; subMenuList = submenus.EndGame; _LeaderboardUI = transform.parent.GetComponentInChildren<LeaderboardUI>(); _lb = transform.parent.GetComponentInChildren<PhpLeaderboards>(); _RespawnUI = transform.parent.GetComponentInChildren<RespawnUI>(); lbInitpos = _LeaderboardUI.transform.localPosition; lbOutPos = new Vector3 (lbInitpos.x, lbInitpos.y-5f, lbInitpos.z); respInitpos = _RespawnUI.transform.localPosition; respOutPos = new Vector3 (respInitpos.x-20f, respInitpos.y, respInitpos.z); BackOne = FETool.findWithinChildren(gameObject, "Background/p1"); BackTwo = FETool.findWithinChildren(gameObject, "Background/p2"); BackOneIn = FETool.findWithinChildren(gameObject, "Background/newPosP1"); BackTwoIn = FETool.findWithinChildren(gameObject, "Background/newPosP2"); Succeed = FETool.findWithinChildren(gameObject, "SUCCEED").GetComponent<TextUI>(); CurrLvl = FETool.findWithinChildren(gameObject, "CURRLVL").GetComponent<TextUI>(); CurrLvl.text = LevelManager.CurrentLevelInfo.LvlName.ToString(); CrabbySpr = FETool.findWithinChildren(gameObject, "Crab").GetComponentInChildren<OTSprite>(); StrokeSpr = FETool.findWithinChildren(gameObject, "Door/Stroke").GetComponentInChildren<OTSprite>(); VortexSpr = FETool.findWithinChildren(gameObject, "Door/Vortex").GetComponentInChildren<OTSprite>(); }
// Use this for initialization public void Setup() { GameEventManager.GameStart += GameStart; GameEventManager.GameOver += GameOver; GameEventManager.Respawn += Respawn; _LeaderboardUI = transform.parent.GetComponentInChildren<LeaderboardUI>(); _lb = transform.parent.GetComponentInChildren<PhpLeaderboards>(); _lb.Setup(); _RespawnUI = transform.parent.GetComponentInChildren<RespawnUI>(); _RespawnUI.Setup(this); lbInitpos = _LeaderboardUI.transform.position; lbOutPos = _menuMan.BottomPos.position; respInitpos = _RespawnUI.transform.position; respOutPos = _menuMan.BottomPos.position; new OTTween(_RespawnUI.gameObject.transform, 0.3f, OTEasing.QuadIn ).Tween("position", respInitpos); new OTTween(_LeaderboardUI.gameObject.transform, 0.3f).Tween("position", lbInitpos); }