FairyGUI.Transition.Play C# (CSharp) Method

Play() public method

public Play ( ) : void
return void
        public void Play()
        {
            Play(1, 0, null);
        }

Same methods

Transition::Play ( PlayCompleteCallback onComplete ) : void
Transition::Play ( int times, float delay, PlayCompleteCallback onComplete ) : void

Usage Example

示例#1
0
    //创建获得金币
    public void ShowGetGold(int gold)
    {
        Debug.Log("------------ShowGetGold------------");
        GComponent words = UIPackage.CreateObject("GameUI", "HurtInfo").asCom;
        WordsInfo  wd    = AddWordsInfo(words);

        wd.RandomX(-30, 30);

        //words.z = 0;
        //1,直接加到GRoot显示出来
        GRoot.inst.AddChild(words);
        GRoot.inst.SetChildIndex(words, 1);
        words.GetChild("num").asTextField.text            = "" + gold;
        words.GetChild("num").asTextField.color           = new Color(245 / 255.0f, 218 / 255.0f, 0);
        words.GetChild("num").asTextField.shadowOffset    = new Vector2(1, 1);
        words.GetChild("num").asTextField.textFormat.bold = true;
        FairyGUI.Transition trans = words.GetTransition("getgold");
        trans.Play();
        trans.SetHook("over", () => {
            RemoveWordsInfo(wd);
        });

        //音效
        AudioManager.Am.Play3DSound(AudioManager.Sound_Gold, this.Mode.transform.position);
    }
All Usage Examples Of FairyGUI.Transition::Play