void Start()
    {
        if (GameObject.FindGameObjectWithTag("LevelManager").GetComponent <WorldData>() != null)
        {
            worldData = GameObject.FindGameObjectWithTag("LevelManager").GetComponent <WorldData>();
        }
        else
        {
            Debug.Log("could not locate worldData in sellresourcerewarehouse");
        }
        if (GameObject.FindGameObjectWithTag("LevelManager").GetComponent <PlayerInfo>() != null)
        {
            playerInfo = GameObject.FindGameObjectWithTag("LevelManager").GetComponent <PlayerInfo>();
        }
        else
        {
            Debug.Log("could not locate playerInfo in sellresourcerewarehouse");
        }
        if (GetComponent <SellPriceWareHouse>() != null)
        {
            sellPriceWareHouse = GetComponent <SellPriceWareHouse>();
        }
        else
        {
            Debug.Log("could not locate sellpricewarehouse in sellresourcewarehouse");
        }
        if (GetComponent <wareHouse>() != null)
        {
            wareHouse = GetComponent <wareHouse>();
        }
        else
        {
            Debug.Log("could not locate warehouse in sellresourcewarehouse");
        }

        GameObject tempObject = GameObject.Find("sellMenuWareHouse");

        if (tempObject != null)
        {
            sellMenu = tempObject.GetComponent <Canvas>();
            if (sellMenu == null)
            {
                Debug.Log("Could not locate Canvas component on " + tempObject.name);
            }
        }
    }
Esempio n. 2
0
 public CellDialog(wareHouse wh)
 {
     InitializeComponent();
     pgCell.SelectedObject = wh;
 }
Esempio n. 3
0
 public CellDialog(wareHouse wh)
 {
     InitializeComponent();
     pgCell.SelectedObject = wh;
 }