예제 #1
0
    public void SellModule()
    {
        Game.credits += GetSellAmount();

        PlayerInput.cur.contextMenu.ExitMenu();
        AssemblyCircleMenu.Close();

        DestroyModule();
    }
예제 #2
0
    void OnMouseDownElement()
    {
        // The entire isUpgrading part of this isn't used anymore. Remove if it annoys you.
        if (PlayerInput.cur.isUpgrading && isRoot && Game.credits >= GetFullUpgradeCost())
        {
            UpgradeAssembly(0);
            UpgradeAssembly(1);
            UpgradeAssembly(2);

            UpdateHoverContextElement();
            GetComponent <HoverContextElement> ().ForceUpdate();
        }
        else if (!PlayerInput.cur.isUpgrading)
        {
            AssemblyCircleMenu.Open(Camera.main.WorldToScreenPoint(transform.position), this);
        }
    }
 void Awake()
 {
     cur = this;
     Close();
 }