public DrawingCanvas() { StateMachine = new CanvasStateMachine(this); StateMachine.Register( typeof(SelectCanvasState), typeof(AddPolygonCanvasState), typeof(AddLineStringCanvasState), typeof(AddPontCanvasState) ); Focusable = true; }
public override void Awake() { if (!m_meshTextMesh) { m_meshTextMesh = GetComponentInChildren(typeof(TextMesh)) as TextMesh; } m_startingMessage = m_meshTextMesh.text; m_dialogueText = GameObject.Find("DialogueText").GetComponent(typeof(Text)) as Text; m_characterNameText = GameObject.Find("CharacterNameText").GetComponent(typeof(Text)) as Text; m_canvasStateMachine = GameObject.Find("Canvas").GetComponent(typeof(CanvasStateMachine)) as CanvasStateMachine; m_canvasTalkingState = GameObject.Find("Canvas").GetComponentInChildren(typeof(CanvasTalkingState)) as CanvasTalkingState; m_canvasDefaultState = GameObject.Find("Canvas").GetComponentInChildren(typeof(CanvasDefaultState)) as CanvasDefaultState; m_dialogue.InitDictionary(); }