Ejemplo n.º 1
0
    public void OnMouseDown()
    {
        if (upgradeMenuPrefab != null)
        {
            GameObject go = Instantiate <GameObject>(upgradeMenuPrefab);

            UpgradeMenu upgradeMenu = go.GetComponentInChildren <UpgradeMenu>();
            upgradeMenu.Initiate(this);
            upgradeMenu.transform.position = Camera.main.WorldToScreenPoint(transform.position);
        }
    }