示例#1
0
    void ShowHandle()
    {
        if (ModelShow != null & ModelShow.gameObject.activeSelf)
        {
            if (tempPos != ModelShow.transform.position)
            {
                tempPos = ModelShow.transform.position;
                Debug.Log(ModelShow.gameObject.name + " " + ModelShow.transform.position);
            }

            if (Input.GetKeyUp(KeyCode.JoystickButton0) ||
                Input.GetKeyUp(KeyCode.Return) ||
                Input.GetKeyUp(KeyCode.KeypadEnter) ||
                (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began) ||
                Input.GetMouseButtonDown(0))
            {
                play = !ModelShow.HasNextState;
                if (play)
                {
                    index++;
                    if (index >= modelPanel.modelArray.Count)
                    {
                        index = 0;
                        //Application.Quit();
                    }
                    ModelShow.NextModelShow(modelPanel.modelArray[index], EYE);
                    ModelShow = modelPanel.modelArray[index];
                }
                else
                {
                    ModelShow.ShowAnimation(ModelShow);
                }
            }
        }
    }
示例#2
0
 void Init()
 {
     if (modelPanel.modelArray[index] != null)
     {
         ModelShow = modelPanel.modelArray[index];
         if (!ModelShow.gameObject.activeSelf)
         {
             ModelShow.gameObject.SetActive(true);
         }
         ModelShow.NextModelShow(ModelShow, EYE);
     }
     else
     {
         Debug.LogError("ModelShow Is Null");
     }
 }