예제 #1
0
        public override string GenerateJson(bool topLevel)
        {
            var b = new StringBuilder(base.GenerateJson(false));

            var s = Text1.GenerateJson(false);

            if (!string.IsNullOrWhiteSpace(s) && s != "\"\"")
            {
                b.AppendFormat(s.StartsWith("\"") ? "Text1:{0}," : "Text1:\"{0}\",", s);
            }

            s = Text2.GenerateJson(false);
            if (!string.IsNullOrWhiteSpace(s) && s != "\"\"")
            {
                b.AppendFormat(s.StartsWith("\"") ? "Text2:{0}," : "Text2:\"{0}\",", s);
            }

            s = Text3.GenerateJson(false);
            if (!string.IsNullOrWhiteSpace(s) && s != "\"\"")
            {
                b.AppendFormat(s.StartsWith("\"") ? "Text3:{0}," : "Text3:\"{0}\",", s);
            }

            s = Text4.GenerateJson(false);
            if (!string.IsNullOrWhiteSpace(s) && s != "\"\"")
            {
                b.AppendFormat(s.StartsWith("\"") ? "Text4:{0}," : "Text4:\"{0}\",", s);
            }

            return(b.ToString());
        }
예제 #2
0
        private void OnTimedEvent1(object sender, ElapsedEventArgs e)
        {
            BarraProgresso2.ProgressTo(1, 5000, Easing.Linear);

            Text1.TranslateTo(-500, 0, 500, Easing.Linear);

            Text2.TranslateTo(370, 0, 500, Easing.Linear);

            Text3.TranslateTo(70, 0, 500, Easing.Linear);
            Text3.FadeTo(0, 600, Easing.SinInOut);


            Imagens.FadeTo(1, 500, Easing.SinInOut);

            Planet.TranslateTo(-80, 175, 500, Easing.Linear);
            Planet.ScaleTo(2.5, 500);

            Timer timer = new Timer();

            timer.Interval = 5000;

            timer.Elapsed += OnTimedEvent2;

            timer.AutoReset = false;

            timer.Enabled = true;
        }
 public AtmButtonControl(AtmButton atmButton)
 {
     InitializeComponent();
     ButtonText0   = atmButton.Text0;
     ButtonText1   = atmButton.Text1;
     ButtonText2   = atmButton.Text2;
     ButtonText3   = atmButton.Text3;
     Text0Color    = atmButton.Text0Color.ToString() != "#00000000" ? atmButton.Text0Color : Colors.White;
     Text1Color    = atmButton.Text1Color.ToString() != "#00000000" ? atmButton.Text1Color : Colors.White;
     Text2Color    = atmButton.Text2Color.ToString() != "#00000000" ? atmButton.Text2Color : Colors.White;
     Text3Color    = atmButton.Text3Color.ToString() != "#00000000" ? atmButton.Text3Color : Colors.White;
     MainText.Text = atmButton.MainText;
     ImagePath     = atmButton.ImagePath;
     Name          = atmButton.Name + DateTime.Now.Ticks;
     ButtonImage.SetValue(NameProperty, Name);
     MainText.SetValue(NameProperty, Name);
     Text0.SetValue(NameProperty, Name);
     Text1.SetValue(NameProperty, Name);
     Text2.SetValue(NameProperty, Name);
     Text3.SetValue(NameProperty, Name);
     IsRightButton = atmButton.IsRightButton;
     if (IsRightButton)
     {
         ButtonGrid.HorizontalAlignment = HorizontalAlignment.Right;
     }
 }
예제 #4
0
 // Update is called once per frame
 void Update()
 {
     Text1.GetComponent <Text>().text = "" + PlayerManager.player[0].WatchWallet();
     Text2.GetComponent <Text>().text = "" + PlayerManager.player[1].WatchWallet();
     Text3.GetComponent <Text>().text = "" + PlayerManager.player[2].WatchWallet();
     Text4.GetComponent <Text>().text = "" + PlayerManager.player[3].WatchWallet();
 }
예제 #5
0
 protected override void Prepare(EndianBinaryWriter w)
 {
     Position.Write(w);
     WriteString8(w, Text1.Serialize());
     WriteString8(w, Text2.Serialize());
     WriteString8(w, Text3.Serialize());
     WriteString8(w, Text4.Serialize());
 }
예제 #6
0
    private void Debug()
    {
        Text TextX = Text1.GetComponent <Text>();
        Text TextY = Text2.GetComponent <Text>();
        Text TextZ = Text3.GetComponent <Text>();

        TextX.text = "X : " + TmpX;
        TextY.text = "Y : " + TmpY;
        TextZ.text = "Z : " + TmpZ;
    }
예제 #7
0
    // Start is called before the first frame update
    void Start()
    {
        Gamemana    = GameObject.Find("GameManager");
        Gamemanager = Gamemana.GetComponent <GameManager>();

        Text1.SetActive(false);
        Text2.SetActive(false);
        Text3.SetActive(false);
        //Trajectory.SetActive(false);
        //ResultCamera.SetActive(false);
    }
        private void Text3_KeyPress(System.Object _sender, System.Windows.Forms.KeyPressEventArgs _e1)
        {
            int KeyAscii = (short)(_e1.KeyChar);

            if (!((KeyAscii >= (short)("0"[0]) && KeyAscii <= (short)("9"[0]) || KeyAscii == Keys.Back || KeyAscii == Keys.KeyDelete || KeyAscii == Keys.Space || KeyAscii == Keys.Return)))
            {
                MessageBox.Show("Maaf Hanya Boleh Diisi Angka Saja", "Perhatian", MessageBoxButtons.OK, MessageBoxIcon.Information);
                KeyAscii = 0;
                Text3.Focus();
            }
        }
예제 #9
0
    // Désactive les textes
    IEnumerator DisparaitreMessage() // IEnumerator est utiliser pour faire une pause
    {
        // Arrête l'exécution de la coroutine pendant 13 secondes
        yield return(new WaitForSeconds(13f));

        // Désactive les textes d'information
        Text1.SetActive(false); // Désactive le texte d'information
        Text2.SetActive(false); // Désactive le texte d'information
        Text3.SetActive(false); // Désactive le texte d'information
        Text4.SetActive(false); // Désactive le texte d'information
        Text5.SetActive(false); // Désactive le texte d'information
    }
예제 #10
0
        // Actions on the person
        private void AddGuest_Click(object sender, EventArgs e)
        {
            personToEdit = false;

            Text1.Clear();
            Text2.Clear();
            Text3.Clear();
            Text4.Clear();
            TPDateOfBirth.Value = DateTime.Today;

            Panel_Reservation.Enabled = false;
            Panel_Guest.Visible       = true;
        }
예제 #11
0
    public GameObject Text1, Text2, Text3, Text4, Text5; // Les textes d'information

    // Fonction qui fait apparaitre les messages
    public void Message()
    {
        // Active les textes d'information qui sont, à l'origine, désactivés
        Text1.SetActive(true); // Active le texte d'information qui est, à l'origine, désactivé
        Text2.SetActive(true); // Active le texte d'information qui est, à l'origine, désactivé
        Text3.SetActive(true); // Active le texte d'information qui est, à l'origine, désactivé
        Text4.SetActive(true); // Active le texte d'information qui est, à l'origine, désactivé
        Text5.SetActive(true); // Active le texte d'information qui est, à l'origine, désactivé

        // Fonction qui permet, selon le yield, d'avoir une certaine pause entre l'activation et la désactivation des textes
        // Débute la fonction DisparaitreMessage comme une coroutine qui peut arrêter son exécution
        StartCoroutine(DisparaitreMessage());
    }
예제 #12
0
 void OnCollisionStay(Collision col)
 {
     if (col.gameObject.tag == "hinanIn")
     {
         Text1.SetActive(true);
         if (Input.GetKey(KeyCode.U))
         {
             this.transform.position = Out.transform.position;
         }
     }
     else
     {
         Text1.SetActive(false);
     }
     if (col.gameObject.tag == "yama")
     {
         Text2.SetActive(true);
         if (Input.GetKey(KeyCode.D))
         {
             this.transform.position = In.transform.position;
         }
     }
     else
     {
         Text2.SetActive(false);
     }
     if (col.gameObject.tag == "Finish")
     {
         Text3.SetActive(true);
         if (Input.GetKey(KeyCode.Q))
         {
             //Quit();
             //OtherCamera.SetActive(false);
             //ResultCamera.SetActive(true);
             //Trajectory.SetActive(true);
             Gamemanager.SinarioFlag = 5;
             Debug.Log("避難が完了した。");
         }
     }
     else
     {
         Text3.SetActive(false);
     }
 }
예제 #13
0
    // Update is called once per frame
    void Update()
    {
        if (clear1 == false)
        {
            WaitTime = 8;
            if ((Input.GetMouseButtonDown(0)) & (tapp == false))
            {
                TapAction(1);
                if (nottile != true)
                {
                    Text1.enabled = true;
                    Text1.GetComponent <Animator>().SetTrigger("isText1");
                }
            }
            if (endrotation == true)
            {
                yajirusi3.gameObject.SetActive(false);
                Text2.enabled     = true;
                endrotation       = false;
                next.interactable = true;
                Task.text         = "クリア";
            }
        }
        else if ((clear1 == true) & (clear21 == false))
        {
            WaitTime  = 5;
            Task.text = "側面にある黄色いタイルをタップしよう";
            if ((Input.GetMouseButtonDown(0)) & (tapp == false))
            {
                TapAction(2);
            }
            if (endrotation == true)
            {
                yajirusi2.gameObject.SetActive(false);
                next.interactable = true;
                clear21           = true;
                endrotation       = false;
            }
        }
        else if ((clear23 == true) & (clear22 == false))
        {
            WaitTime  = 3;
            Task.text = "端にある黄色いタイルをタップしよう";
            if ((Input.GetMouseButtonDown(0)) & (tapp == false))
            {
                TapAction(3);
            }
            if (endrotation == true)
            {
                yajirusi1.gameObject.SetActive(false);
                endrotation       = false;
                next.interactable = true;
                clear24           = true;
                Task.text         = "クリア";


                //Debug.Log(TileContraller.TutrialClear);
            }
        }
        else if ((clear1 == true) & (clear22 == true) & (clear31 == false))
        {
            WaitTime      = 8;
            Task.text     = "タイルを重ねて\n色を進化させよう";
            Text3.enabled = true;
            Text3.GetComponent <Animator>().SetTrigger("isText3");
            Text4.enabled = true;
            Text4.GetComponent <Animator>().SetTrigger("isText4");
            //Debug.Log(TileContraller.TutrialClear);
            if ((Input.GetMouseButtonDown(0)) & (tapp == false))
            {
                endrotation = false;
                TapAction(4);
            }
            if ((TileContraller.TutrialClear == true) & (endrotation == true))
            {
                endrotation       = false;
                clear31           = true;
                next.interactable = true;
                Task.text         = "クリア";
            }
        }
        else if ((clear32 == true) && (clear51 == false))
        {
            WaitTime       = 1;
            Task.text      = "黄色いタイルをタップしよう";
            Text42.enabled = true;
            if ((Input.GetMouseButtonDown(0)) & (tapp == false))
            {
                TapAction(5);
            }
            if (endrotation == true)
            {
                clear51           = true;
                next.interactable = true;
                Task.text         = "クリア";
            }
        }
    }
예제 #14
0
파일: Item.cs 프로젝트: SNUGDC/HomeAlone
    public void Buy()
    {
        if (ItemName == "soda")
        {
            if (BoughtNumber > 0 || soda.sodaBoughtTimes == 1)
            {
                //already have
                if (Text1 != null && Notice1 != null)
                {
                    Text1.GetComponent <Text> ().enabled      = true;
                    Notice1.GetComponent <Image> ().enabled   = true;
                    Notice1.GetComponent <FadeOut> ().enabled = true;
                }
                Debug.Log("you already have one OR bought two times.");
            }
            else
            {
                if (MoneySystem.money >= ItemPrice)
                {
                    MoneySystem.money     = MoneySystem.money - ItemPrice;
                    MoneySystem.MoneyOut  = true;
                    MoneySystem.remainder = MoneySystem.money;
                    SetActiveObject.SetActive(true);
                    SetActiveObject2.SetActive(true);
                    BoughtImage.SetActive(true);
                    BoughtNumber++;
                    save();
                    if (Text3 != null && Notice3 != null)
                    {
                        Text3.GetComponent <Text> ().enabled      = true;
                        Notice3.GetComponent <Image> ().enabled   = true;
                        Notice3.GetComponent <FadeOut> ().enabled = true;
                    }
                    Debug.Log("Buy!");
                }
                else
                {
                    if (Text2 != null && Notice2 != null)
                    {
                        Text2.GetComponent <Text> ().enabled      = true;
                        Notice2.GetComponent <Image> ().enabled   = true;
                        Notice2.GetComponent <FadeOut> ().enabled = true;
                    }
                    //not enough money
                }
            }
        }
        else if (ItemName == "Table" || ItemName == "Cushion" || ItemName == "laundry" || ItemName == "gompang" || ItemName == "mug" || ItemName == "plate" || ItemName == "cake")
        {
            if (BoughtNumber > 0)
            {
                //already have
                if (Text1 != null && Notice1 != null)
                {
                    Text1.GetComponent <Text> ().enabled      = true;
                    Notice1.GetComponent <Image> ().enabled   = true;
                    Notice1.GetComponent <FadeOut> ().enabled = true;
                }
                Debug.Log("you have already one!");
            }
            else
            {
                if (MoneySystem.money >= ItemPrice)
                {
                    MoneySystem.money     = MoneySystem.money - ItemPrice;
                    MoneySystem.MoneyOut  = true;
                    MoneySystem.remainder = MoneySystem.money;
                    SetActiveObject.SetActive(true);
                    SetActiveObject2.SetActive(true);
                    BoughtImage.SetActive(true);
                    BoughtNumber++;
                    save();
                    if (Text3 != null && Notice3 != null)
                    {
                        Text3.GetComponent <Text> ().enabled      = true;
                        Notice3.GetComponent <Image> ().enabled   = true;
                        Notice3.GetComponent <FadeOut> ().enabled = true;
                    }
                    Debug.Log("Buy!");
                }
                else
                {
                    //not enough money
                    if (Text2 != null && Notice2 != null)
                    {
                        Text2.GetComponent <Text> ().enabled      = true;
                        Notice2.GetComponent <Image> ().enabled   = true;
                        Notice2.GetComponent <FadeOut> ().enabled = true;
                    }
                }
            }
        }
        else                    // basic item
        {
            if (MoneySystem.money >= ItemPrice)
            {
                MoneySystem.money    = MoneySystem.money - ItemPrice;
                MoneySystem.MoneyOut = true;
//				MoneySystem.ContentsName = ItemName;
//				MoneySystem.outcome = -ItemPrice;
                MoneySystem.remainder = MoneySystem.money;
                //SetActiveObject.GetComponent<Image> ().enabled = true;
                SetActiveObject.SetActive(true);
                SetActiveObject2.SetActive(true);
                BoughtImage.SetActive(true);
                BoughtNumber++;
                save();
                if (Text3 != null && Notice3 != null)
                {
                    Text3.GetComponent <Text> ().enabled      = true;
                    Notice3.GetComponent <Image> ().enabled   = true;
                    Notice3.GetComponent <FadeOut> ().enabled = true;
                }
                Debug.Log("Buy!");
            }
            else
            {
                //not enough money
                if (Text2 != null && Notice2 != null)
                {
                    Text2.GetComponent <Text> ().enabled      = true;
                    Notice2.GetComponent <Image> ().enabled   = true;
                    Notice2.GetComponent <FadeOut> ().enabled = true;
                }
                Debug.Log("Be short of money");
            }
        }
    }