// Start is called before the first frame update void Start() { idleState = gameObject.GetComponent <NewsUIIdleState>(); entryState = gameObject.GetComponent <NewsUIEntryState>(); for (int i = 0; i < 5; i++) { var newsUI = newsUIs[i].GetComponent <NewsUI>(); // StateをIdleにする newsUI.IdleStart(); } }
private void Awake() { // 各ステートを初期化 entryState = GetComponent <NewsUIEntryState>(); exitState = GetComponent <NewsUIExitState>(); idleState = GetComponent <NewsUIIdleState>(); showState = GetComponent <NewsUIShowState>(); newsUIContext = new NewsUIContext(); ReadTextParameter(); }