示例#1
0
    void Start()
    {
        viewManager    = GameObject.Find("ViewManager").GetComponent <ViewManager>();
        pageScrollRect = GameObject.Find("SclGame").transform.GetComponent <PageScrollRect>();

        this.gameObject.AddComponent(typeof(EventDoubleTap));
        GetComponent <EventDoubleTap>().onDoubleTap.AddListener(onDoubleTap);
        this.gameObject.AddComponent(typeof(EventLongPress));
        eventLP = GetComponent <EventLongPress> ();
        eventLP.onLongPressPara.AddListener(OnLongPressPara);
        eventLP.onLongPressParaExit.AddListener(OnLongPressExit);
        eventLP.intervalAction = 0.07f;                 // LongPress判定時間

        viewManager    = GameObject.Find("ViewManager").GetComponent <ViewManager> ();
        scriptGameView = viewManager.scriptGameView;
        tfPlayPanel    = GameObject.Find("PlayPanel").transform;
        MaxPos         = new Vector3(99999f, 99999f);

        receiveParentPosition      = new Vector3[26];      // 待機休憩2 + コート*4 が必要  (2+最大6面*4=26)
        receiveParentTransform     = new Transform[receiveParentPosition.Length];
        receiveParentTransform[24] = GameObject.Find("WaitLayoutVertical").transform;
        receiveParentTransform[25] = GameObject.Find("BreakLayoutVertical").transform;
        receiveParentPosition [24] = GameObject.Find("WaitListScroll").transform.position;
        receiveParentPosition [25] = GameObject.Find("BreakListScroll").transform.position;
        distance = new float[receiveParentPosition.Length];
        setReciveCourtTrans(1, "ImgCourt1");
        setReciveCourtTrans(2, "ImgCourt2");
        setReciveCourtTrans(3, "ImgCourt3");
        setReciveCourtTrans(4, "ImgCourt4");
        setReciveCourtTrans(5, "ImgCourt5");
        setReciveCourtTrans(6, "ImgCourt6");
    }
示例#2
0
 void Start()
 {
     scrRct = this.transform.parent.parent.parent.GetComponent <ScrollRect>();               // 不要Eventを送る親
     this.gameObject.AddComponent(typeof(EventLongPress));
     eventLP = GetComponent <EventLongPress> ();
     eventLP.onLongPress.AddListener(OnLongPress);
     eventLP.onLongPressPara.AddListener(OnLongPressPara);
     eventLP.intervalAction = 0.5f;                  // LongPress判定時間
 }
示例#3
0
    void Start()
    {
        this.gameObject.AddComponent(typeof(EventLongPress));
        eventLP = GetComponent <EventLongPress>();
        eventLP.onLongPressPara.AddListener(OnLongPressPara);
        eventLP.onLongPressParaExit.AddListener(OnLongPressExit);
        eventLP.intervalAction = 0.4f;              // LongPress判定時間

        scriptExecStartView = GameObject.Find("ExecStart").transform.GetComponent <ScriptExecStartView>();
    }
示例#4
0
    void Start()
    {
        viewManager = GameObject.Find("ViewManager").GetComponent <ViewManager>();
        scrRct      = this.transform.parent.parent.parent.GetComponent <ScrollRect>();          // 不要Eventを送る親
        this.gameObject.AddComponent(typeof(EventLongPress));
        eventLP = GetComponent <EventLongPress> ();
        eventLP.onLongPressPara.AddListener(OnLongPressPara);
        eventLP.onLongPressParaExit.AddListener(OnLongPressExit);
        eventLP.intervalAction = 0.4f;                  // LongPress判定時間

        this.gameObject.AddComponent(typeof(EventDoubleTap));
        eventDT = GetComponent <EventDoubleTap> ();
        eventDT.onDoubleTap.AddListener(onDoubleTap);
    }