public static CCGetBoatAction GetSSAtion(GameObject Object) { CCGetBoatAction action = ScriptableObject.CreateInstance <CCGetBoatAction> (); //action.target = target; action.gameObject = Object; action.transform = Object.transform; return(action); }
public MyCharacterController(string theCharacter) { if (theCharacter == "priest") { character = Object.Instantiate(Resources.Load("Perfabs/Priest", typeof(GameObject)), Vector3.zero, Quaternion.identity, null) as GameObject; characterType = 0; } else { character = Object.Instantiate(Resources.Load("Perfabs/Devil", typeof(GameObject)), Vector3.zero, Quaternion.identity, null) as GameObject; characterType = 1; } //moveableScript = character.AddComponent(typeof(Moveable)) as Moveable; //moveToAction = character.AddComponent(typeof(CCMoveToAction)) as CCMoveToAction; getBoatAction = CCGetBoatAction.GetSSAtion(character); clickGUI = character.AddComponent(typeof(ClickGUI)) as ClickGUI; clickGUI.setController(this); }