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


C# Stage.PlaceHalls方法代码示例

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


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

示例1: Awake

    /*Everything related to creating the dungeon itself */
    void Awake()
    {
        newEnemyWeights = new Dictionary<string, int>();
        newEnemyWeights.Add("aggressive", 3);
        newEnemyWeights.Add("smart", 3);
        newEnemyWeights.Add("turret", 1);
        newEnemyWeights.Add("zombie", 2);
        newEnemyWeights.Add("worm", 2);

        Application.targetFrameRate = 60    ;
        QualitySettings.vSyncCount = 0;
        scale = Accessiblescale;
        stage = new Stage(floorMaterials, wallMaterials, FBuilder);
        //TODO: place rooms first.
        stage._addRooms();
        stage.PlaceHalls();
        stage.createDoors();
        stage.removeDeadEnds();
        stage.Create();
        spawnPlayer();
        Player = GameObject.FindWithTag("Player").transform;
        maxEnemies = (Player.gameObject.GetComponent<PlayerController>().getCurrentFloor() + 1) * enemiesPerLevel;
        numEnemies = 0;

        enemyWeights = new float[6, 3];

        enemyWeights[0, 0] = 0.5f;
        enemyWeights[0, 1] = 1f;
        enemyWeights[0, 2] = 0;

        enemyWeights[1, 0] = 0.4f;
        enemyWeights[1, 1] = 0.8f;
        enemyWeights[1, 2] = 1f;

        enemyWeights[2, 0] = 0.35f;
        enemyWeights[2, 1] = 0.7f;
        enemyWeights[2, 2] = 1f;

        enemyWeights[3, 0] = 0.35f;
        enemyWeights[3, 1] = 0.7f;
        enemyWeights[3, 2] = 1f;

        enemyWeights[4, 0] = 0.35f;
        enemyWeights[4, 1] = 0.7f;
        enemyWeights[4, 2] = 0.3f;

        enemyWeights[5, 0] = 0.35f;
        enemyWeights[5, 1] = 0.35f;
        enemyWeights[5, 2] = 0.3f;

        pool = GameObject.Find("ObjectPool").GetComponent<ObjectPooling>();
    }
开发者ID:mattgor123,项目名称:CS355-Robo-Clean-5000,代码行数:53,代码来源:StageBuilder.cs


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