Exemplo n.º 1
0
    bool display          = false;  //プレイヤーがクリックされた際の表示非表示を切り替えるための変数

    // Use this for initialization
    void Start()
    {
        //-----------------------------------------------------------------------------------------------------------------
        //当たり判定オブジェクト取得
        //-----------------------------------------------------------------------------------------------------------------
        Up2    = GameObject.Find("Player2/Up2");
        Down2  = GameObject.Find("Player2/Down2");
        Right2 = GameObject.Find("Player2/Right");
        Left2  = GameObject.Find("Player2/Left2");

        //-----------------------------------------------------------------------------------------------------------------
        //当たり判定のスクリプト取得
        //-----------------------------------------------------------------------------------------------------------------
        Uscript2 = GameObject.Find("Up2").GetComponent <UP2>();
        Dscript2 = GameObject.Find("Down2").GetComponent <DOWN2>();
        Rscript2 = GameObject.Find("Right2").GetComponent <RIGHT2>();
        Lscript2 = GameObject.Find("Left2").GetComponent <LEFT2>();

        //-----------------------------------------------------------------------------------------------------------------
        //矢印オブジェクト取得
        //-----------------------------------------------------------------------------------------------------------------
        UpArrow2    = GameObject.Find("UpArrow2");
        DownArrow2  = GameObject.Find("DownArrow2");
        RightArrow2 = GameObject.Find("RightArrow2");
        LeftArrow2  = GameObject.Find("LeftArrow2");

        //-----------------------------------------------------------------------------------------------------------------
        //初期化
        //-----------------------------------------------------------------------------------------------------------------
        Ctrigger   = false;  //クリック判定初期化
        direction2 = 0;      //向き変数の初期化
    }
Exemplo n.º 2
0
 protected void Unnamed_Click(object sender, EventArgs e)
 {
     error = Check.InfCheck(name.Text.ToString().Trim(), email.Text.ToString().Trim(), policeNum.Text.ToString().Trim());
     if (error[0] == 1)
     {
         nameTip.Style.Add("display", "inline"); UP1.Update();
     }
     else
     {
         nameTip.Style.Add("display", "none"); UP1.Update();
     }
     if (error[1] == 1)
     {
         mailTip.Style.Add("display", "inline"); UP3.Update();
     }
     else
     {
         mailTip.Style.Add("display", "none"); UP3.Update();
     }
     if (error[2] == 1)
     {
         policeNumTip.Style.Add("display", "inline"); UP2.Update();
     }
     else
     {
         policeNumTip.Style.Add("display", "none"); UP2.Update();
     }
     if (error[0] == 1 || error[1] == 1 || error[2] == 1)
     {
         confirm.Style.Add("display", "none"); UPelse.Update();
     }
     else
     {
         confirm.Style.Add("display", "normal"); UPelse.Update();
     }
 }