예제 #1
0
    public void changeMode()
    {
        mode = (displayMode)(((int)mode + 1) % 5);

        modeText.text = mode.ToString();

        modeChange = true;
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("Country Info start");
        countryName      = GameObject.Find("CountryName").GetComponent <Text> ();
        countryName.text = "P ";
        box1             = GameObject.Find("Box1").GetComponent <Text> ();
        box1.text        = "P ";
        box2             = GameObject.Find("Box2").GetComponent <Text> ();
        box2.text        = "G ";
        box3             = GameObject.Find("Box3").GetComponent <Text> ();
        box3.text        = "P ";
        box4             = GameObject.Find("Box4").GetComponent <Text> ();
        box4.text        = "G ";
        box5             = GameObject.Find("Box5").GetComponent <Text> ();
        box5.text        = "P ";
        box6             = GameObject.Find("Box6").GetComponent <Text> ();
        box6.text        = "G ";
        box7             = GameObject.Find("Box7").GetComponent <Text> ();
        box7.text        = "G ";
        box8             = GameObject.Find("Box8").GetComponent <Text> ();
        box8.text        = "";

        modeText      = GameObject.Find("ModeText").GetComponent <Text> ();
        modeText.text = mode.ToString();


        triangles [0] = GameObject.Find("Triangle1").GetComponent <Image> ();
        triangles [1] = GameObject.Find("Triangle2").GetComponent <Image> ();
        triangles [2] = GameObject.Find("Triangle3").GetComponent <Image> ();
        triangles [3] = GameObject.Find("Triangle4").GetComponent <Image> ();
        triangles [4] = GameObject.Find("Triangle5").GetComponent <Image> ();
        triangles [5] = GameObject.Find("Triangle6").GetComponent <Image> ();
        triangles [6] = GameObject.Find("Triangle7").GetComponent <Image> ();
        for (int i = 0; i < 7; i++)
        {
            setChangeBlank(triangles [i]);
        }



        archive = SArchive.GetComponent <SpriteArchive> ();

        for (int i = 0; i < 16; i++)
        {
            iconBoxs [i] = GameObject.Find("IconBox" + (i + 1));
            icons[i]     = GameObject.Find("Icon" + (i + 1));

            iconStatus [i] = false;
        }
        icons [14].GetComponent <Image> ().color = transparentColor;
        icons [15].GetComponent <Image> ().color = transparentColor;

        prevGenerics [0] = "";
        prevGenerics [1] = "";
        prevGenerics [2] = "";



        map = WorldMap2D.instance;


        map.ErrorLog     = ErrorLog;
        map.errorMessage = ErrorMessage.GetComponent <Text> ();
        ErrorLog.SetActive(false);

        LoadingScreen.SetActive(false);
        Debug.Log("Country Info initialized");
    }