Ejemplo n.º 1
0
    /// <summary>
    /// 获取触摸移动方向的方法
    /// </summary>
    /// <param name="gesture"></param>
    public void OnSwipe(SwipeGesture gesture)

    {
        // 完整的滑动数据

        Vector2 move = gesture.Move;

        // 滑动的速度

        float velocity = gesture.Velocity;

        // 大概的滑动方向

        FingerGestures.SwipeDirection direction = gesture.Direction;



        if (direction.ToString() == "Left")
        {
            Audiomanagement.B_Click_Audio_Source("Turn_over_aBook");
            print(direction.ToString());
            autoFlip.FlipRightPage();
        }
        else
        {
            Audiomanagement.B_Click_Audio_Source("Turn_over_aBook");
            print(direction.ToString());

            autoFlip.FlipLeftPage();
        }
    }
Ejemplo n.º 2
0
    IEnumerator B_money_Text()//初始金币
    {
        Audiomanagement.B_Click_Audio_Source("anniu2");
        money_Text.SetActive(true);          //初始金币设为true
        reputation_Text.SetActive(false);    //初始名声设为false
        courage_Text.SetActive(false);       //初始勇气设为false
        yield return(new WaitForSeconds(2)); //运行后2秒

        money_Text.SetActive(false);         //初始金币设为false
    }
Ejemplo n.º 3
0
    IEnumerator B_Image_CardsLimit()//卡牌
    {
        Audiomanagement.B_Click_Audio_Source("anniu2");
        Image_CardsLimit.SetActive(true);    //初始卡牌设为true
        Image_Fali.SetActive(false);         //将初始法力设为false
        Image_Action.SetActive(false);       //将初始行动力设为false
        yield return(new WaitForSeconds(2)); //运行后2秒

        Image_CardsLimit.SetActive(false);   //初始卡牌设为false
    }
Ejemplo n.º 4
0
    public override void  OnButtoneClickAction(MyEventArgs arg)
    {
        GameObject.Find("Notice_btn").AddComponent <AudioSource>();

        //  AudioSource Button_audioSource = GameObject.Find("Notice_btn").GetComponent<AudioSource>();
        //   Button_audioSource = Resources.Load<AudioSource>("/music/Button");
        //   AudioSource audioSource = this.GetComponent<AudioSource>();
        print(arg.id);
        switch (arg.id)
        {
        case 1:

            //      audioSource.Play();
            AddScript("Notice_Panel");
            Audiomanagement.B_Click_Audio_Source("anniu3");
            //       Button_audioSource.Play();
            break;

        case 2:

            AddScript("Setting_Panel");
            Audiomanagement.B_Click_Audio_Source("anniu3");
            Debug.Log(b1);
            Audiomanagement.B_Slider_music(b1, b2);
            b1 = false;
            b2 = false;
            break;

        case 3:
            AddScript("NewGame_Panel");
            Audiomanagement.B_Click_Audio_Source("ren_wu_shuo_hua4");
            break;

        case 4:
            SceneManager.LoadScene("MainScene");
            AddScript("MainSceneMainPanel");
            Audiomanagement.B_Click_Audio_Source("ren_wu_shuo_hua10");
            break;

        case 5:
            AddScript("Achievements_Panel");
            Audiomanagement.B_Click_Audio_Source("anniu3");
            break;

        default:
            break;
        }
    }
Ejemplo n.º 5
0
 public void B_Back_panel_BottonmInfo(string B_str) //传入参数 判断分别将技能面板,卡包面板,返回面板设为false
 {
     if (B_str == "Image_Button_SpecialAbility")
     {
         Audiomanagement.B_Click_Audio_Source("anniu3");
         Image_Button_SpecialAbility.SetActive(false);
     }
     if (B_str == "Image_Button_OwnedCard")
     {
         Audiomanagement.B_Click_Audio_Source("anniu3");
         Image_Button_OwnedCard.SetActive(false);
     }
     if (B_str == "st")
     {
         Audiomanagement.B_Click_Audio_Source("anniu3");
         Image_Button_return.SetActive(false);
     }
 }
Ejemplo n.º 6
0
    /// <summary>
    /// 入栈
    /// </summary>
    public UIBase PushUIPanel(string UIname)
    {
        if (UIStack.Count > 0)
        {
            UIBase old_topUI = UIStack.Peek();
            old_topUI.DoOnPausing();
            Audiomanagement.B_Click_Audio_Source("anniu3");
        }
        UIBase new_topUI = GetUIBase(UIname);

        new_topUI.DoOnEntering();
        UIStack.Push(new_topUI);
        foreach (string ui in currentUIDic.Keys)
        {
            if (ui == UIname)
            {
                return(new_topUI);
            }
        }
        new_topUI.UILayer = currentUIDic.Count;
        currentUIDic.Add(UIname, new_topUI);
        new_topUI.transform.SetSiblingIndex(new_topUI.UILayer);
        return(new_topUI);
    }
Ejemplo n.º 7
0
 public override void DoOnPausing()
 {
     Audiomanagement.B_Click_Audio_Source("anniu3");
     this.gameObject.SetActive(false);
 }
 void Start()
 {
     B_but = this.GetComponent <Button>();
     B_but.onClick.AddListener(delegate { Audiomanagement.B_Click_Audio_Source("anniu5"); });
 }
Ejemplo n.º 9
0
 void Start()
 {
     B_But = this.GetComponent <Button>();
     B_But.onClick.AddListener(delegate { Audiomanagement.B_Click_Audio_Source("ren_wu_shuo_hua10"); });
 }
Ejemplo n.º 10
0
 void B_Button_return()
 {
     Audiomanagement.B_Click_Audio_Source("anniu3");
     Image_Button_return.SetActive(true);//将返回面板设为true
 }
Ejemplo n.º 11
0
 void B_Button_OwnedCard()
 {
     Audiomanagement.B_Click_Audio_Source("anniu3");
     Image_Button_OwnedCard.SetActive(true);//将卡包面板设为true
 }
Ejemplo n.º 12
0
 void B_Button_SpecialAbility()
 {
     Debug.Log("AAAAAAAA");
     Audiomanagement.B_Click_Audio_Source("anniu3");
     Image_Button_SpecialAbility.SetActive(true);//将技能面板设为true
 }