本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
示例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();
}
示例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]);
}
示例7: StatusBtnLight
void ElevatorListener.FloorArrived(Floor arrived)
{
if (floorOfCallButton == arrived) {
StatusBtnLight(true);
blinking = true;
}
}
示例8: SetFloor
public void SetFloor(Floor newFloor)
{
_isOnStair = false;
// Debug.Log("newFloor");
currentFloor = newFloor;
if (body.velocity.y < -0.5f)
CrackSound();
}
示例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);
}
示例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;
}
示例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);
}
}
示例12: Start
// Use this for initialization
void Start()
{
floor = GetComponent<Floor>(); // find the floor game object
timerValue = spawnSpeed;
player = GameObject.FindGameObjectWithTag("Player");
}
示例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);
}
示例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();
}
示例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;
}