예제 #1
0
파일: Base.cs 프로젝트: KeplerVK/Unity3d
    public static CCGetBoatAction GetSSAtion(GameObject Object)
    {
        CCGetBoatAction action = ScriptableObject.CreateInstance <CCGetBoatAction> ();

        //action.target = target;
        action.gameObject = Object;
        action.transform  = Object.transform;
        return(action);
    }
예제 #2
0
파일: Base.cs 프로젝트: KeplerVK/Unity3d
    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);
    }