void Start() { KanjiManager.Init(); //IMPORTANT KanjiWriter = gameObject.AddComponent <WriterManager>(); KanjiWriter.TargetCamera = TargetCamera; KanjiWriter.TrailPrefab = TrailPrefab; KanjiWriter.AddOnWinPerfectEvent(new OnWinPerfect(WinPerfectEvent)); KanjiWriter.AddOnWinAlmostEvent(new OnWinAlmost(WinAlmostEvent)); KanjiWriter.AddOnWinPoorEvent(new OnWinPoor(WinPoorEvent)); KanjiWriter.AddOnNewKanjiEvent(new OnNewKanji(NewKanjiEvent)); KanjiWriter.NewKanji(); }
void Awake() { KanjiManager.Init(); WriterRef = GetComponent <Writer>() ?? gameObject.AddComponent <Writer>(); WriterRef.writerManager = this; }