1
0
Fork 0
Bildschirmflausch-LD41/Assets/Scripts/Generation/GenTile.cs

43 lines
708 B
C#
Raw Normal View History

2018-04-22 21:22:20 +02:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GenTile
{
public enum Position
{
2018-04-23 00:27:44 +02:00
BOTTOM_LEFT = 0,
BOTTOM = 1,
BOTTOM_RIGHT = 2,
2018-04-22 21:40:02 +02:00
LEFT = 3,
CENTER = 4,
RIGHT = 5,
2018-04-23 00:27:44 +02:00
TOP_LEFT = 6,
TOP = 7,
TOP_RIGHT = 8
2018-04-22 21:22:20 +02:00
}
2018-04-22 21:40:02 +02:00
2018-04-22 21:22:20 +02:00
public Room.TileType type;
public Position position;
public GenTile()
{
2018-04-22 21:40:02 +02:00
}
public GenTile(Room.TileType type)
{
this.type = type;
}
public GenTile(Room.TileType type, Position position)
{
this.type = type;
this.position = position;
2018-04-22 21:22:20 +02:00
}
2018-04-22 21:40:02 +02:00
public static Position GetPosition(int xMode, int yMode) {
return (Position) ((xMode + 1) + (yMode + 1) * 3);
2018-04-22 21:22:20 +02:00
}
}