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


C# Floor类代码示例

本文整理汇总了C#中Floor的典型用法代码示例。如果您正苦于以下问题:C# Floor类的具体用法?C# Floor怎么用?C# Floor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Stair

 public Stair(Vector2 enterPos, Vector2 outPos, Floor destination, StairCase target)
 {
     this.enterPos = enterPos;
     this.outPos = outPos;
     this.destination = destination;
     this.target = target;
 }
开发者ID:yulcat,项目名称:BeyondTheCity,代码行数:7,代码来源:Floor.cs

示例2: createGenerator

    public bool createGenerator(Floor end)
    {
        if(!isEmpty())
            return false;

        has=terrain.generator;
        GameObject generatorObject = (GameObject)Instantiate(	generatorPrefab,
                                    new Vector3(transform.position.x, transform.position.y, transform.position.z),
                                    Quaternion.identity
                                );

        GameObject laserObject = (GameObject)Instantiate(	laserPrefab,
                                    new Vector3(transform.position.x, transform.position.y, transform.position.z),
                                    Quaternion.identity
                                );
        laserObject.GetComponent<Laser>().setOriginEnd(generatorObject, end.gameObject);

        Vector3 vect = end.gameObject.transform.position - generatorObject.transform.position;

        float ang=Vector3.Angle(new Vector3(0,0,1), vect);

        if(vect.x<0)
            ang=ang*(-1);

        generatorObject.transform.Rotate(new Vector3(0, ang, 0 ));

        currentObject = generatorObject;
        generatorObject.tag = "Generator";

        emitMineralSprite ("-", GameController.generatorCost.ToString());
        emitParticles(1);

        return true;
    }
开发者ID:tcourreges,项目名称:HOPE,代码行数:34,代码来源:Floor.cs

示例3: Meeple

        public Meeple(Game game, Floor floor)
            : base()
        {
            CurrentFloor = floor.Number;

            // Gotta pick a floor that's not this one.
            int goingUp = game.Random.Next(2);
            // GOING UP, unless we're on the top floor
            if (goingUp == 1 && CurrentFloor != Game.NUMBER_OF_FLOORS - 1)
            {
                Destination = game.Random.Next(CurrentFloor + 1, Game.NUMBER_OF_FLOORS);
            }

            // GOING DOWN, unless we're on the bottom floor
            else if (CurrentFloor != 0)
            {
                Destination = game.Random.Next(CurrentFloor);
            }

            // GOING UP, because we're on the bottom floor
            else
            {
                Destination = game.Random.Next(0, Game.NUMBER_OF_FLOORS);
            }

            // because meeple get frustrated
            Patience = Math.Abs(Destination - CurrentFloor) * Meeple.FrustrationCoefficient + 3;
            Id = _maxId++;
            InElevator = false;
        }
开发者ID:jklung,项目名称:BellTowerEscape,代码行数:30,代码来源:Meeple.cs

示例4: GenerateCave

    public void GenerateCave(Floor floor)
    {
        FillWithRock (floor);
        //		RandomlyPlaceFloor (floor, 50);

        RandomFloor (floor, 50);

        Generate (floor);
        //
        RandomlyDistrabute (floor, 50);
        Generate (floor);
        RandomlyDistrabute (floor, 50);
        Generate (floor);
        RandomlyDistrabute (floor, 50);
        Generate (floor);
        RandomlyDistrabute (floor, 50);
        Generate (floor);
        RandomlyDistrabute (floor, 50);
        Generate (floor);
        RandomlyDistrabute (floor, 50);
        Generate (floor);
        RandomlyDistrabute (floor, 50);
        Generate (floor);
        RandomlyDistrabute (floor, 50);
        Generate (floor);
        RandomlyDistrabute (floor, 50);
        Generate (floor);
        Generate (floor);
        Generate (floor);
        Generate (floor);
        Generate (floor);
    }
开发者ID:Antrum,项目名称:Unity,代码行数:32,代码来源:CaveGenerator.cs

示例5: Update

    /*
    void Update()
    {

    }
    */
    //****************************************************************************************************
    //*** Functions
    public void MakeFloor()
    {
        // Remove last Floor (except theres an Editor-Test-Level generated already)
        RemoveFloor();

        // Instantiate a new Floor
        activeFloor = new Floor(Global.global.floorSizeX, Global.global.floorSizeZ);

        // Instantiate new Tile-Blocks based on new Floor-Data
        for(int x=0; x<Global.global.floorSizeX; x++)
        {
        for(int z=0; z<Global.global.floorSizeZ; z++)
        {
            byte tile = activeFloor.blockMap[x, z];
            if(tile < 254)
            {
                GameObject tb = Instantiate(tileBlock, new Vector3(x, 0, z), Quaternion.identity) as GameObject;
                tb.renderer.material = materials[tile];

                // group as child into "LEVEL"-GameObject
                tb.transform.parent = this.transform;
            }
        }
        }

        MakeGround();

        SetPlayerPosition();

        SetLightSources();

        MakeMap();

        PositionEnemies();
    }
开发者ID:hArDyTRSi,项目名称:Roguelike_SciFi,代码行数:43,代码来源:GenerateFloors.cs

示例6: GenerateAllRooms

    /// <summary>
    /// Used to generate all rooms.
    /// </summary>
    /// <description> Generates all rooms by calling the GenerateRoom function until there is either
    /// no more possible room locations in the list PossibleRoomLocations or the amount of rooms made
    /// has hit the target number of rooms specified in the inspector. If it has been specified in the 
    /// inspector to make as many rooms as possible, the target number of rooms will be changed to a 
    /// very large number which would not be possible to complete. </description>
    /// <param name="floor">Floor to generate rooms on</param>
    public void GenerateAllRooms(Floor floor)
    {
        if (floor.reflectRoomsX) reflectX = true;
        else reflectX = false;

        if (floor.reflectRoomsZ) reflectZ = true;
        else reflectZ = false;

        if (asManyAsPossible) targetNumOfRooms = 1000;

        bool finished = false;

        GenerateCentralRoom ();

        while (!finished) {

            if (PossibleRoomLocations ().Count > 0 && targetNumOfRooms > roomList.Count) {

                GenerateRoom ();
            }
            else finished = true;
        }

        if (reflectX) ReflectX ();
        if (reflectZ) ReflectZ ();

        //ConnectRooms (roomList[0], roomList[1]);
    }
开发者ID:Antrum,项目名称:Unity,代码行数:37,代码来源:RoomGenerator.cs

示例7: StatusBtnLight

 void ElevatorListener.FloorArrived(Floor arrived)
 {
     if (floorOfCallButton == arrived) {
         StatusBtnLight(true);
         blinking = true;
     }
 }
开发者ID:theabeing,项目名称:studierturm-simulator,代码行数:7,代码来源:CallElevator.cs

示例8: SetFloor

 public void SetFloor(Floor newFloor)
 {
     _isOnStair = false;
     // Debug.Log("newFloor");
     currentFloor = newFloor;
     if (body.velocity.y < -0.5f)
         CrackSound();
 }
开发者ID:yulcat,项目名称:BeyondTheCity,代码行数:8,代码来源:MovableObject.cs

示例9: AimingArrow

        public AimingArrow(PuzzleBooble3dGame game, Floor floor)
            : base(game)
        {
            Floor = floor;

            AngleZ = 0;
            Position = Floor.Position + new Vector3(Floor.WIDTH/2, 0, Ball.BALL_RADIUS);
        }
开发者ID:rz-robsn,项目名称:PuzzleBooble3DClone,代码行数:8,代码来源:AimingArrow.cs

示例10: IsNextTo

 public bool IsNextTo(Floor otherFloor)
 {
     int diffX = this.X - otherFloor.X;
     int diffY = this.Y - otherFloor.Y;
     if (diffX == 0 || diffY == 0)
         return (System.Math.Abs(diffX + diffY) == 1);
     return false;
 }
开发者ID:DormantDreams,项目名称:video-game-level-scanner,代码行数:8,代码来源:Floor.cs

示例11: DrawFloor

 void DrawFloor(Floor floor, int yOffset)
 {
     for(int i=0; i<floor.rooms.Count; i++)
     {
         Room room = floor.rooms[i];
         DrawRoom (room, 50*(i+1), yOffset);
     }
 }
开发者ID:nczempin,项目名称:Turn-the-Corner,代码行数:8,代码来源:FloorMap.cs

示例12: Start

    // Use this for initialization
    void Start()
    {
        floor = GetComponent<Floor>(); // find the floor game object

        timerValue = spawnSpeed;

        player = GameObject.FindGameObjectWithTag("Player");
    }
开发者ID:AdamDWalker,项目名称:CapsuleKiller,代码行数:9,代码来源:EnemySpawn.cs

示例13: House

    public House(int _size)
    {
        size = _size;

        attic = new Floor(size, FloorType.Attic);
        ground = new Floor(size, FloorType.Ground);
        basement = new Floor(size, FloorType.Basement);
    }
开发者ID:Somerse,项目名称:Betrayal,代码行数:8,代码来源:House.cs

示例14: ProfileFloor

 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="floor">floor to create reinforcement on</param>
 /// <param name="commandData">object which contains reference to Revit Application</param>
 public ProfileFloor(Floor floor, ExternalCommandData commandData)
     : base(commandData)
 {
     m_data = floor;
     List<List<Edge>> faces = GetFaces(m_data);
     m_points = GetNeedPoints(faces);
     m_to2DMatrix = GetTo2DMatrix();
 }
开发者ID:AMEE,项目名称:revit,代码行数:13,代码来源:ProfileFloor.cs

示例15: FilmShowing

    Floor theFloor;     // the floor object - used by customers for pathfinding

    // CONSTRUCTOR for the class
    public FilmShowing(int id, int screenNumber, int tickets, int hours, int minutes, Floor f)
    {
        screeningID = id;
        screenNum = screenNumber;
        ticketsSold = tickets;
        timeH = hours;
        timeM = minutes;
        theFloor = f;
    }
开发者ID:andrewdavis1995,项目名称:Cinema-Game,代码行数:12,代码来源:FilmShowing.cs


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