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


C# PlayerData.Launch方法代码示例

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


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

示例1: Setup

    public void Setup()
    {
        SETUP = MainTitleUI.getSetup();
        PLAYERDATA = GameObject.FindGameObjectWithTag("PlayerData").GetComponent<PlayerData>();
        PLAYERDATA.Launch();
        ThumbGO = new GameObject("Thumbnails");
        ThumbGO.transform.parent = gameObject.transform;
        ThumbGO.transform.localPosition = new Vector3(0f,0f,0f);
        levelName = FETool.findWithinChildren(gameObject, "LevelTitle/LEVEL_NAME").GetComponent<TextUI>();
        _btnLeft = FETool.findWithinChildren(gameObject, "SelectLeft").GetComponent<LevelChooserButton>();
        _btnRight = FETool.findWithinChildren(gameObject, "SelectRight").GetComponent<LevelChooserButton>();

        Thumbs.Clear();
        foreach (LevelInfo _lvl in PLAYERDATA.PROFILE.ActivatedLevels)
        {
            LevelThumbnail _th = CreateThumbnail(_lvl);
            Thumbs.Add(_th);
        }
        for (int j = 0; j < Thumbs.Count ; j++)
        {
        //			Thumbs[j].gameObject.transform.localPosition = new Vector3(0f,0f,0f);
            Thumbs[j].gameObject.transform.localPosition = new Vector3(j * gapThumbs.x, 0f, gapThumbs.z);
        }

        Thumbs[0].isStartSlot = true;
        Thumbs[Thumbs.Count-1].isEndSlot = true;

        _btnLeft.Setup(this, LevelChooserButton.DirectionList.Left);
        _btnRight.Setup(this, LevelChooserButton.DirectionList.Right);
        currThumb = Thumbs[0];
        levelName.text = currThumb.nameLv.ToString();
        checkCurrThumb();
    }
开发者ID:Tavrox,项目名称:Lavapools,代码行数:33,代码来源:LevelChooser.cs

示例2: Start

    // Use this for initialization
    void Start()
    {
        base.Setup();

        if (GameObject.FindGameObjectWithTag("PlayerData") == null)
        {
            GameObject _dataplayer = Instantiate(Resources.Load("Presets/PlayerData")) as GameObject;
            _profile = _dataplayer.GetComponent<PlayerData>();
            _profile.Launch();
        }
        else
        {
            _profile = GameObject.FindGameObjectWithTag("PlayerData").GetComponent<PlayerData>();
            _profile.Launch();
        }

        BuyBtn = FETool.findWithinChildren(gameObject, "Buy").GetComponent<MiscButton>();
        FeedBtn = FETool.findWithinChildren(gameObject, "Feedback").GetComponent<MiscButton>();
        ReturnBtn = FETool.findWithinChildren(gameObject, "ReturnHome").GetComponent<MiscButton>();
        EndAlpha = FETool.findWithinChildren(gameObject, "END_ALPHA").GetComponent<TextUI>();
        EndDemo = FETool.findWithinChildren(gameObject, "END_DEMO").GetComponent<TextUI>();

        if (_profile.SETUP.GameType == GameSetup.versionType.Alpha)
        {
            EndDemo.color = Color.clear;
        }
        if (_profile.SETUP.GameType == GameSetup.versionType.Demo)
        {
            EndAlpha.color = Color.clear;

        }
        SubMenu _sub = GetComponent<SubMenu>();
        _sub.SetupSub(this);
        _sub.setupBtn();
        currentActiveMenu = _sub;
        currFocusedbtn = _sub.menuButtons[0];
        _sub.menuButtons[0].giveFocus(true);
        InvokeRepeating("checkPadMenu", 0f, 0.5f);

        TranslateAllInScene();
    }
开发者ID:Tavrox,项目名称:Lavapools,代码行数:42,代码来源:OblivionUI.cs

示例3: Awake

    // Use this for initialization
    public void Awake()
    {
        if (GameObject.Find("Frameworks") == null)
        {
            GameObject fmObj = Instantiate(Resources.Load("Presets/Frameworks")) as GameObject;
            fmObj.name = "Frameworks";
        }

        if (GameObject.FindGameObjectWithTag("PlayerData") == null)
        {
            GameObject _dataplayer = Instantiate(Resources.Load("Presets/PlayerData")) as GameObject;
            _profile = _dataplayer.GetComponent<PlayerData>();
            _profile.Launch();
        }
        else
        {
            _profile = GameObject.FindGameObjectWithTag("PlayerData").GetComponent<PlayerData>();
            _profile.Launch();
        }

        if (_profile.SETUP.GameType == GameSetup.versionType.Demo)
        {
        //			Screen.SetResolution(800,600, false);
        //			GameObject.Find("Frameworks/OT/View").GetComponent<OTView>().pixelPerfectResolution = new Vector2(800f,600f);
        //			GameObject.Find("Frameworks/OT/View").GetComponent<OTView>().alwaysPixelPerfect = true;
        //			GameObject.Find("Frameworks/OT/View").GetComponent<OTView>().customSize = 4;
        }

        GAMESTATE = _EditorState;
        _player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
        GlobTuning = Instantiate(Resources.Load("Tuning/Global")) as LPTuning;
        InputMan = Instantiate(Resources.Load("Tuning/InputManager")) as InputManager;
        CurrentLevelInfo = Instantiate(Resources.Load("Tuning/Levels/" + NAME)) as LevelInfo;

        LocalTuning = Instantiate(Resources.Load("Maps/" + NAME + "/Setup")) as LevelParameters;
        LocalTuning.initScript();

        GameObject OutSpw = new GameObject("OuterSpawn");
        OuterSpawn = OutSpw;
        OuterSpawn.transform.parent = FETool.findWithinChildren(this.gameObject, "Enviro").transform;
        OuterSpawn.transform.position = new Vector3(0f, -7.5f, 0f);

        tools = gameObject.AddComponent<LevelTools>();
        tools._levMan = this;
        TranslateAllInScene();

        CollectiblePlaces[] collecPla = FETool.findWithinChildren(this.gameObject, "Enviro/CollectiblePlaces").GetComponentsInChildren<CollectiblePlaces>();
        foreach (CollectiblePlaces cpl in collecPla)
        {
            collecPlaces.Add(cpl);
        }
        Gate = GameObject.FindGameObjectWithTag("SpaceGate").GetComponent<SpaceGate>();
        Gate.Setup(this);

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

        bricksMan = FETool.findWithinChildren(this.gameObject, "LevelBricks/Bricks").GetComponent<BricksManager>();
        bricksMan.Setup();

        if (GAMETYPE != LocalTuning.levelType)
        {
            Debug.Log("Type of LevelMana & Setup scrip arent't the same");
        }
        GAMETYPE = LocalTuning.levelType;
        switch (GAMETYPE)
        {
        case LevelParameters.levelTypeList.Debuggin :
        {
            linearTrigger = gameObject.AddComponent<LinearStepTrigger>();
            linearTrigger.Setup(this);
            break;
        }
        case LevelParameters.levelTypeList.Linear :
        {
            linearTrigger = gameObject.AddComponent<LinearStepTrigger>();
            linearTrigger.Setup(this);
            break;
        }
        case LevelParameters.levelTypeList.Maze :
        {
            break;
        }
        case LevelParameters.levelTypeList.Procedural :
        {
            GameObject gameo = FETool.createGameObject("ProceduralManager", gameObject);
            ProcMana = gameo.AddComponent<Procedural>();
            ProcMana.Setup(this);
            break;
        }
        case LevelParameters.levelTypeList.Vertical :
        {
            GameObject vm = new GameObject("VerticalManager");
            VerticalManager = vm.AddComponent<VerticalScroller>();
            vm.transform.parent = this.transform;
            VerticalManager.Setup(this);
            break;
        }
        }
//.........这里部分代码省略.........
开发者ID:Tavrox,项目名称:Lavapools,代码行数:101,代码来源:LevelManager.cs


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