public virtual void Init(DungeonUnity dungeonUnity, DungeonEntity entity)
    {
        this.dungeonUnity = dungeonUnity;
        this.entity       = entity;

        trans.position = dungeonUnity.GetWorldPosition(entity.Position);
        trans.rotation = dungeonUnity.GetWorldRotation(entity.Rotation);
    }
Beispiel #2
0
    public void Init(DungeonUnity dungeonUnity, DungeonVector2 position, DungeonTile tile)
    {
        this.tile         = tile;
        this.position     = position;
        this.dungeonUnity = dungeonUnity;

        trans.position = dungeonUnity.GetWorldPosition(position);
        trans.rotation = Quaternion.identity;

        floor     = AddSide(tile.floor, DungeonTileSideType.Floor);
        ceiling   = AddSide(tile.ceiling, DungeonTileSideType.Ceiling);
        wallNorth = AddSide(tile.wallNorth, DungeonTileSideType.WallNorth);
        wallSouth = AddSide(tile.wallSouth, DungeonTileSideType.WallSouth);
        wallEast  = AddSide(tile.wallEast, DungeonTileSideType.WallEast);
        wallWest  = AddSide(tile.wallWest, DungeonTileSideType.WallWest);
    }
Beispiel #3
0
 public DungeonEventHandlerEntityMoved(DungeonUnity dungeon, DungeonEventEntityMoved dungeonEvent)
 {
     entity   = dungeon.GetEntityUnity(dungeonEvent.entity);
     moveFrom = dungeon.GetWorldPosition(dungeonEvent.from);
     moveTo   = dungeon.GetWorldPosition(dungeonEvent.to);
 }