public RhythmTap CreateWord(CorePlayManager manager, ClickObj clickWord, EffectInOutTiming inOut = EffectInOutTiming.Default, int sentenceIndex = 0) { RhythmTap tap = new RhythmTap(); tap.Start(manager, clickWord, inOut, sentenceIndex); return(tap); }
public CorePlayInputCheck(CorePlayManager manager) { m_Manager = manager; m_SentenceMap = new Dictionary <int, CheckSentence> (); SentenceAllRightEvent.RemoveAllListeners(); GetVoiceComplete.RemoveAllListeners(); }
public void Start(CorePlayManager manager, ClickObj clickWord, EffectInOutTiming inOut, int sentenceIndex) { IsTutorial = false; m_Manager = manager; m_Clickable = true; m_HitWord = clickWord.m_Word; m_SentenceIndex = sentenceIndex; // 创建 m_ObjectTrans = ObjectPool.GetOne("RhythmController").transform; // Set Transform Vector3 pos = clickWord.m_Position; pos = new Vector3(pos.x / OSU_WIDTH * ScreenWidth - HalfScreenWidth, HalfScreenHeight - pos.y / OSU_HEIGHT * ScreenHeight, 0); // Set RhythmController contrller = m_ObjectTrans.GetComponent <RhythmController>(); contrller.Init(this, clickWord.m_Word, clickWord.m_ShowWord, pos, inOut); }
// Use this for initialization void Start() { m_AllWordNum = 0; if (Instance != null) { Destroy(Instance); LogManager.Log("Clear CorePlayManager"); } Instance = this; m_Status = GameStatus.Idle; m_Horn.SetActive(false); m_InputCheck = new CorePlayInputCheck(this); m_AutoPlay = Instantiate(ResourceLoadUtils.Load <GameObject>("CorePlay/AutoPointer")).GetComponent <CorePlayAutoPlay>(); m_AutoPlay.Close(); CorePlayInputCheck.SentenceAllRightEvent.RemoveAllListeners(); m_TapCreator = new RhythmTapCreator(); m_TapCreator.SetManager(this); m_VoiceCreator = new RhythmVoiceCreator(); PageManager.Instance.CurrentPage.GetNode <CalculateNode>().ShowMainSliderAndPauseButton(); Reset(); if (!m_EditMode) { CalcCorePlayData(); StartLogic(); } }
private void SetListener() { transform.Find("PlayAudio/Play").GetComponent <Button>().onClick.AddListener(Play); transform.Find("PlayAudio/Pause").GetComponent <Button>().onClick.AddListener(Pause); transform.Find("PlayAudio/Stop").GetComponent <Button>().onClick.AddListener(Stop); m_TimeScaleDropDown = transform.Find("TimeScale").GetComponent <Dropdown>(); m_TimeScaleDropDown.onValueChanged.AddListener(GetTimeScaleDrop); m_BPM = transform.Find("Bpm").GetComponent <InputField>(); if (GetBPMFromData) { m_BPM.text = CorePlayData.CurrentSong.BPM.ToString(); } else { m_BPM.text = ""; } m_TimerSlider = transform.Find("PlayAudio/PlayTime").GetComponent <Slider>(); Transform ruler = transform.GetChild(Ruler); m_TimeLineRuler = ruler.GetComponent <EditorModeTimeLineCircle>(); m_TimeLineRuler.Init(); m_CorePlayManager = gameObject.AddComponent <CorePlayManager>(); m_CorePlayManager.SetEditMode(); gameObject.AddComponent <EditorModePointerControl>(); m_EditorOperation = new EditorModeOperation(); }
public void SetManager(CorePlayManager manager) { m_Manager = manager; }