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"); }
protected override void OnEnable() { base.OnEnable(); ps = (PageScrollRect)target; obj = new SerializedObject(target); pageNum = obj.FindProperty("pageNum"); loadItemMode = obj.FindProperty("loadItemMode"); slidMode = obj.FindProperty("slidMode"); movementType = obj.FindProperty("_movementType"); }
protected override void OnEnable() { _scrollRect = this.target as PageScrollRect; base.OnEnable(); this.m_CellNum = this.serializedObject.FindProperty("cellNum"); this.m_SnapOnEnable = this.serializedObject.FindProperty("snapOnEnable"); this.m_SnapVelocityThreshold = this.serializedObject.FindProperty("snapVelocityThreshold"); this.m_SnapWatchOffset = this.serializedObject.FindProperty("snapWatchOffset"); this.m_SnapTweenTime = this.serializedObject.FindProperty("snapTweenTime"); this.m_EaseType = this.serializedObject.FindProperty("easeType"); }
void Start() { viewManager = GameObject.Find("ViewManager").GetComponent <ViewManager>(); pageScrollRect = GameObject.Find("Game/MainPanel/PlayPanel/SclGame").GetComponent <PageScrollRect>(); courtNum = myView.transform.Find("SettingPanel/LayoutV/ElmCourt/DrpCourt").GetComponent <Dropdown>(); formDoubles = myView.transform.Find("SettingPanel/LayoutV/ElmForm/tglGroup/TglDoubles").GetComponent <Toggle>(); formSingles = myView.transform.Find("SettingPanel/LayoutV/ElmForm/tglGroup/TglSingles").GetComponent <Toggle>(); weightMin = myView.transform.Find("SettingPanel/LayoutV/ElmWeight/tglGroup/TglMin").GetComponent <Toggle>(); weightMax = myView.transform.Find("SettingPanel/LayoutV/ElmWeight/tglGroup/TglMax").GetComponent <Toggle>(); sumYes = myView.transform.Find("SettingPanel/LayoutV/ElmSum/tglGroup/TglYes").GetComponent <Toggle>(); sumNo = myView.transform.Find("SettingPanel/LayoutV/ElmSum/tglGroup/TglNo").GetComponent <Toggle>(); joinInitMin = myView.transform.Find("SettingPanel/LayoutV/ElmJoinInit/tglGroup/TglMin").GetComponent <Toggle>(); joinInitZero = myView.transform.Find("SettingPanel/LayoutV/ElmJoinInit/tglGroup/TglZero").GetComponent <Toggle>(); execAuto = myView.transform.Find("SettingPanel/LayoutV/ElmExec/tglGroup/TglAuto").GetComponent <Toggle>(); execManual = myView.transform.Find("SettingPanel/LayoutV/ElmExec/tglGroup/TglManual").GetComponent <Toggle>(); waitAuto = myView.transform.Find("SettingPanel/LayoutV/ElmWait/tglGroup/TglWaitAuto").GetComponent <Toggle>(); waitManual = myView.transform.Find("SettingPanel/LayoutV/ElmWait/tglGroup/TglWaitManual").GetComponent <Toggle>(); soundOn = myView.transform.Find("SettingPanel/LayoutV/ElmSound/tglGroup/TglSoundOn").GetComponent <Toggle>(); soundOff = myView.transform.Find("SettingPanel/LayoutV/ElmSound/tglGroup/TglSoundOff").GetComponent <Toggle>(); // text formDoublesText = myView.transform.Find("SettingPanel/LayoutV/ElmForm/tglGroup/TglDoubles/Label").GetComponent <Text>(); formSinglesText = myView.transform.Find("SettingPanel/LayoutV/ElmForm/tglGroup/TglSingles/Label").GetComponent <Text>(); weightMinText = myView.transform.Find("SettingPanel/LayoutV/ElmWeight/tglGroup/TglMin/Label").GetComponent <Text>(); weightMaxText = myView.transform.Find("SettingPanel/LayoutV/ElmWeight/tglGroup/TglMax/Label").GetComponent <Text>(); sumYesText = myView.transform.Find("SettingPanel/LayoutV/ElmSum/tglGroup/TglYes/Label").GetComponent <Text>(); sumNoText = myView.transform.Find("SettingPanel/LayoutV/ElmSum/tglGroup/TglNo/Label").GetComponent <Text>(); joinInitMinText = myView.transform.Find("SettingPanel/LayoutV/ElmJoinInit/tglGroup/TglMin/Label").GetComponent <Text>(); joinInitZeroText = myView.transform.Find("SettingPanel/LayoutV/ElmJoinInit/tglGroup/TglZero/Label").GetComponent <Text>(); SinglesKind = myView.transform.Find("SettingPanel/LayoutV/ElmSingles").gameObject; sgsReguler = myView.transform.Find("SettingPanel/LayoutV/ElmSingles/tglGroup/TglReguler").GetComponent <Toggle>(); sgsFree = myView.transform.Find("SettingPanel/LayoutV/ElmSingles/tglGroup/TglFree").GetComponent <Toggle>(); DoublesKind = myView.transform.Find("SettingPanel/LayoutV/ElmDoubles").gameObject; dlsReguler = myView.transform.Find("SettingPanel/LayoutV/ElmDoubles/tglGroup/TglReguler").GetComponent <Toggle>(); dlsComplex = myView.transform.Find("SettingPanel/LayoutV/ElmDoubles/tglGroup/TglComplex").GetComponent <Toggle>(); dlsFree = myView.transform.Find("SettingPanel/LayoutV/ElmDoubles/tglGroup/TglFree").GetComponent <Toggle>(); bPairFix = viewManager.SelectViewHolder.transform.Find("FuncPanel/btnPair").gameObject; this.gameObject.SetActive(false); }