当前位置: 首页>>代码示例>>C#>>正文


C# UI.Setup方法代码示例

本文整理汇总了C#中UI.Setup方法的典型用法代码示例。如果您正苦于以下问题:C# UI.Setup方法的具体用法?C# UI.Setup怎么用?C# UI.Setup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UI的用法示例。


在下文中一共展示了UI.Setup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Awake

    // Use this for initialization
    void Awake()
    {
        plr = GetComponentInChildren<Player>();
        plr.Setup(this);

        TUNING = Resources.Load("Scripts/Tuning") as DTTuning;

        Hours = gameObject.AddComponent<HoursManager>();
        Hours.Setup(this);

        remainingDay = TUNING.DaysComingBeforeSaveDay;

        pathDirector = GetComponentInChildren<WaypointDirector>();
        pathDirector.Setup(this);

        Dracu = GetComponentInChildren<Dracula>();
        Dracu.Setup(this);

        Diff = DifficultyState.BeforeLetter;

        PaperSpots = new List<GameObject>();
        GameObject pSpot = FETool.findWithinChildren(gameObject, "Spots/PaperSpot");
        Spot[] papSpot = pSpot.GetComponentsInChildren<Spot>();
        foreach (Spot obj in papSpot)
        {
            obj.spotType = Spot.spotList.Paper;
            PaperSpots.Add(obj.gameObject);
        }

        FoodSpots = new List<GameObject>();
        GameObject fSpot = FETool.findWithinChildren(gameObject, "Spots/FoodSpot");
        Spot[] fooSpot = fSpot.GetComponentsInChildren<Spot>();
        foreach (Spot obj in fooSpot)
        {
            obj.spotType = Spot.spotList.Food;
            FoodSpots.Add(obj.gameObject);
        }

        //		respawnPaper(PaperSpots);
        spawnFood(FoodSpots);
        saveDay = 1000;

        MailmanState = MailManStateList.Away;
        currCam = FETool.findWithinChildren(gameObject, "Camera").GetComponent<Camera>();
        GameUI = currCam.GetComponentInChildren<UI>();
        GameUI.Setup(this);

        GetComponentInChildren<MailManPlace>().Setup(this);
        bedList = GetComponentsInChildren<Bed>();

        Door[] Doors = GetComponentsInChildren<Door>();
        foreach (Door _dr in Doors)
        {
            _dr.Setup(this);
        }

        Waypoint[] Waypo = GetComponentsInChildren<Waypoint>();
        foreach (Waypoint _wp in Waypo)
        {
            wpList.Add(_wp);
        }

        GameEventManager.GameOver += GameOver;
        GameEventManager.Respawn += Respawn;
        GameEventManager.GameStart += GameStart;
        GameEventManager.EndGame += EndGame;

        MasterAudio.PlaySound("ambiance");

        //				GAMESTATE = GameEventManager.GameState.MainMenu;
        //				GameEventManager.TriggerRespawn("Rsp");
        GAMESTATE = GameEventManager.GameState.Live;
        GameEventManager.TriggerGameStart("First Init");
    }
开发者ID:Tavrox,项目名称:PuzzleRunner,代码行数:75,代码来源:LevelManager.cs


注:本文中的UI.Setup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。