Beispiel #1
0
    //构建方法
    public void maketheItem(attackLinkInformation theAttackLinkInformationIn)
    {
        if (string.IsNullOrEmpty(theAttackLinkInformationIn.attackLinkString) == false)
        {
            theAttackLinkContrtoller = theAttackLinkInformationIn.thePlayer.GetComponentInChildren <attackLinkController> ();
            theAttackLinkContrtoller.makeStart();
        }
        else
        {
            //Destroy (theButtonFoirAttackLink.gameObject);
            theButtonFoirAttackLink.gameObject.SetActive(false);
        }

        theAttackLinkInformation = theAttackLinkInformationIn;
        SelfButtonShow           = theEffectForSelfButton.GetComponent <informationMouseShow> ();
        EMYButtonShow            = theEffectForEMYButton.GetComponent <informationMouseShow> ();
        informationMouseShow theAttackLinkShow = theButtonFoirAttackLink.GetComponent <informationMouseShow> ();

        theButtonFoirAttackLink.GetComponentInChildren <Text> ().text = theAttackLinkInformation.attackLinkName;
        theAttackLinkShow.showText  = theAttackLinkInformation.attackLinkInformationText;
        theAttackLinkShow.showTitle = theAttackLinkInformation.attackLinkName;

        if (string.IsNullOrEmpty(theAttackLinkInformation.theEffectForSelfName))
        {
            //Destroy (theEffectForSelfButton.gameObject);
            theEffectForSelfButton.gameObject.SetActive(false);
        }
        else
        {
            theEffectForSelfButton.GetComponentInChildren <Text> ().text = theAttackLinkInformation.theEffectForSelfName.Split('\n')[0];
            SelfButtonShow.showText  = theAttackLinkInformation.theEffectForSelfInformaion;
            SelfButtonShow.showTitle = theAttackLinkInformation.theEffectForSelfName;
        }

        if (string.IsNullOrEmpty(theAttackLinkInformation.theEffectForEMYName))
        {
            //Destroy (theEffectForEMYButton.gameObject);
            theEffectForEMYButton.gameObject.SetActive(false);
        }
        else
        {
            theEffectForEMYButton.GetComponentInChildren <Text> ().text = theAttackLinkInformation.theEffectForEMYName.Split('\n')[0];
            EMYButtonShow.showText  = theAttackLinkInformation.theEffectForEMYInformaion;
            EMYButtonShow.showTitle = theAttackLinkInformation.theEffectForEMYName;
        }

        if (string.IsNullOrEmpty(theAttackLinkInformationIn.attackLinkString))
        {
            //Destroy (theEffectForShow.gameObject);
            theEffectForShow.gameObject.SetActive(false);
        }
    }
Beispiel #2
0
    //方法1 OnGUI的方法
    void method1()
    {
        if (theShowingOne != null)
        {
            theShowingOne.information = false;
        }

        theShowingOne = this;
        information   = true;

        Texture2D theBack = new Texture2D((int)width, (int)height);

        theGUIStyle.normal.background = theBack;
        theGUIStyle.normal.textColor  = new Color(0, 0, 0); //设置字体颜色的
        theGUIStyle.fontSize          = 15;                 //当然,这是字体大小       GUIStyle bb=new GUIStyle();
    }