Exemplo n.º 1
0
    public void Init()
    {
        tiles         = Tiles.Instance;
        mallGenerator = MallGenerator.Instance;

        mallWidth  = tiles.mallWidth;
        mallHeight = tiles.mallHeight;

        wall         = Resources.Load <GameObject>("Wall");
        door         = Resources.Load <GameObject>("Door");
        hallwayFloor = Resources.Load <GameObject>("HallwayFloor");
        storeFloor   = Resources.Load <GameObject>("StoreFloor");
    }
Exemplo n.º 2
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        MallGenerator mallGenerator = target as MallGenerator;

        if (GUILayout.Button("Clear Mall"))
        {
            mallGenerator.ClearMall();
        }
        if (GUILayout.Button("Generate Mall"))
        {
            mallGenerator.GenerateMall();
        }
        if (GUILayout.Button("TO DO"))
        {
            //mallGenerator.FindPathOnButtonPress();
            Debug.Log("Make listner on the NavigationManager");
        }
    }
Exemplo n.º 3
0
    public void Init()
    {
        mallGenerator          = MallGenerator.Instance;
        pathfindingNodeManager = PathfindingNodeManager.Instance;
        hallWidht       = mallGenerator.hallWidht;
        gridSize        = mallGenerator.gridSize;
        plazaSize       = mallGenerator.plazaSize;
        storeWidth      = mallGenerator.storeWidth;
        storeHeight     = mallGenerator.storeHeight;
        storesOnHallway = mallGenerator.storesOnHallway;
        mallWidth       = mallGenerator.mallWidth;
        mallHeight      = mallGenerator.mallHeight;

        stores   = new List <Tile[, ]>();
        hallways = new Tile[mallWidth, mallHeight];
        doors    = new Tile[mallWidth, mallHeight];
        outside  = new Tile[mallWidth, mallHeight];

        storeSpaces   = new List <MallSpace>();
        hallwaySpaces = new List <MallSpace>();
    }
Exemplo n.º 4
0
 PathfindingNodeManager()
 {
     mallGenerator = MallGenerator.Instance;
     NPC_Object.WhatIsMyClosestNavPoint += FindClosestPathPoint;
 }