Пример #1
0
        public List <TileID> GetTileIDs(float x, float z)
        {
            TerrainID t0 = GetTerrainID(x + 0, z + 1);
            TerrainID t1 = GetTerrainID(x + 1, z + 1);
            TerrainID t2 = GetTerrainID(x + 0, z + 0);
            TerrainID t3 = GetTerrainID(x + 1, z + 0);

            return(TileID.CreateList(t0, t1, t2, t3));
        }
Пример #2
0
    // instanciate the round settings
    public RoundSettings(MovementID _moveID = MovementID.walk, EnemyID _enemyID = EnemyID.none, CombatID _combatID = CombatID.none, TerrainID _terrainID = TerrainID.open)
    {
        moveID    = _moveID;
        enemyID   = _enemyID;
        combatID  = _combatID;
        terrainID = _terrainID;

        moveInfo = MovementSettings.GetMovement(moveID);
    }
Пример #3
0
    public static Terrain PickTerrain(TerrainID id)
    {
        // switch statment returns the correct type of terrain object based on the combat ID
        switch (id)
        {
        case TerrainID.open:                 // TODO! need to implement open (I'm thinking a simple rectangle)
            Debug.Log("Terrain ID Open called, not yet implemented, null retunred");
            return(null);

        case TerrainID.maze:
            GameObject go = new GameObject();
            return(go.AddComponent <Maze>());

        default:
            Debug.Log("Uknown Terrain ID called, null retunred");
            return(null);
        }
    }
Пример #4
0
 public static TerrainInfo GetTerrain(TerrainID id)
 {
     return s_terrains[(int)id];
 }
Пример #5
0
 public bool Match(TerrainID terrain, InteriorID interior)
 {
     return m_terrainMask.Get(terrain) && m_interiorMask.Get(interior);
 }