public CharacterController(string chr, int tag) { this.tag = tag; if (chr == "priest") { character = Object.Instantiate(Resources.Load("Prefabs/Priest", typeof(GameObject)), Vector3.zero, Quaternion.identity) as GameObject; man = 1; } else { character = Object.Instantiate(Resources.Load("Prefabs/Devil", typeof(GameObject)), Vector3.zero, Quaternion.identity) as GameObject; man = 0; } move = character.AddComponent(typeof(Move)) as Move; click = character.AddComponent(typeof(ClickEvent)) as ClickEvent; click.setChrController(this); }