// Use this for initialization void Start() { ssAnimation = gameObject.GetComponent<Spritesheet_Animation>(); ssAnimation.SetDirection(start_dir); ssAnimation.still(); }
//GameObject proto_dialog; //bool show_proto; //public bool npc_convo; void Start() { ground = GameObject.FindGameObjectWithTag ("Ground"); //Find plane representing the ground levelGrid = (Grid)ground.GetComponent (typeof(Grid)); //Get the levelGrid current_tile = levelGrid.iso_array [19, 19]; Vector3 startpos = new Vector3(current_tile.centre.x,current_tile.centre.y,current_tile.centre.z + char_offset); //npc_convo = true; //ground = GameObject.FindGameObjectWithTag ("Ground"); //Find plane representing the ground //levelGrid = (Grid)ground.GetComponent (typeof(Grid)); //Get the levelGrid transform.position = startpos;//levelGrid.iso_array [19, 19].centre; //Set starting position //current_tile = levelGrid.iso_array [19, 19]; //Get the current tile conversation_component = (GameObject)GameObject.Find ("Conversation_Component"); c_renderer = conversation_component.GetComponentsInChildren<Renderer> (); convo = conversation_component.GetComponent<Conversation>(); conversation_component.active = false; foreach (Renderer r in c_renderer) { r.enabled = false; } ssAnimation = gameObject.GetComponent<Spritesheet_Animation>(); ssAnimation.still(); }