コード例 #1
0
    void Awake()
    {
        GameController.Instance.canShoot         = false;
        GameController.Instance.canChangeWeapons = false;
        UIManager.Instance.displayUI             = false;

        GameObject vendor = GameObject.Find("Vendor");

        weaponPanel       = vendor.GetComponent <WeaponPanelGUI>();
        mainPanel         = vendor.GetComponent <MainPanelGUI>();
        buildPanel        = vendor.GetComponent <BuildPanelGUI>();
        abilityPanel      = vendor.GetComponent <AbilityPanelGUI>();
        buildUpgradePanel = vendor.GetComponent <BuildUpgradeGUI>();

        selection = GameController.Instance.GetPlayer().GetComponentInChildren <WeaponSelection>();
        selection.changingWeapons = false;
        selection.drawWeapon      = false;

        style                  = new GUIStyle();
        style.alignment        = TextAnchor.MiddleCenter;
        style.normal.textColor = Color.white;
        style.font             = UIManager.Instance.skin.font;
        style.fontSize         = 50;

        Tutorial tut = GameObject.Find("Tutorial").GetComponent <Tutorial>();

        tut.displaySatelliteInfo = true;
    }
コード例 #2
0
    public void SetFortification(GameObject fort)
    {
        ItemVendor itemVendor = GameObject.Find("Vendor").GetComponent <ItemVendor>();

        itemVendor.upgradeItemVendor = fort;
        fortification = fort;
        uiState       = UIState.FORT_UPGRADE_SCREEN;
        BuildUpgradeGUI build = GameObject.Find("Vendor").GetComponent <BuildUpgradeGUI>();

        build.Reset(false);
    }
コード例 #3
0
ファイル: Dragable.cs プロジェクト: armadillopants/Capstone
 void OnMouseOver()
 {
     if (canUpdate)
     {
         // If we right click on a gameobject, display upgrade item screen
         if (Input.GetMouseButton(1) && GameObject.Find("Tutorial").GetComponent <Tutorial>().key != "LeftClick")
         {
             BuildUpgradeGUI build = GameObject.Find("Vendor").GetComponent <BuildUpgradeGUI>();
             build.Reset(true);
             UIManager.Instance.SetFortification(gameObject);
         }
     }
 }