コード例 #1
0
        void Start()
        {
            SSDirector director = SSDirector.GetInstance();

            director.CurrentScenceController = this;
            gui = gameObject.AddComponent <UserGUI>() as UserGUI;
            LoadResources();
            manager = gameObject.AddComponent <MyActionManager>() as MyActionManager;
            judge   = new Judge(start_land, end_land, boat);
        }
コード例 #2
0
    private int score_round3  = 25;                                   //去到第三回合所需分数

    void Start()
    {
        SSDirector director = SSDirector.GetInstance();

        director.CurrentScenceController = this;
        UFO_factory    = Singleton <DiskFactory> .Instance;
        score_recorder = Singleton <ScoreRecorder> .Instance;
        action_manager = gameObject.AddComponent <Adapter>() as MyActionManager;  //改变
        user_gui       = gameObject.AddComponent <UserGUI>() as UserGUI;
    }
コード例 #3
0
ファイル: Controller.cs プロジェクト: guojj33/Unity3DLearning
 public void SetMode(ActionMode m)
 {
     if (m == ActionMode.KINEMATIC)
     {
         myActionManager = gameObject.AddComponent <MyActionManager>() as MyActionManager;
     }
     else if (m == ActionMode.PHYSICS)
     {
         physicsActionManager = gameObject.AddComponent <PhysicsActionManager>() as PhysicsActionManager;
     }
     actionMode = m;
 }
コード例 #4
0
    public static MyAction NextAction(List <int> pinfFalls)
    {
        MyActionManager am            = new MyActionManager();
        MyAction        currentAction = new MyAction();

        foreach (int pinFall in pinfFalls)
        {
            currentAction = am.Bowl(pinFall);
        }

        return(currentAction);
    }
コード例 #5
0
ファイル: Controller.cs プロジェクト: Boyzf/unity-hw5
    void Start()
    {
        SSDirector director = SSDirector.getInstance();

        director.CurrentSceneController = this;
        userGUI = gameObject.AddComponent <UserGUI>() as UserGUI;
        this.gameObject.AddComponent <ScoreRecorder> ();
        this.gameObject.AddComponent <BloodRecorder> ();
        this.gameObject.AddComponent <DiskFactory> ();
        scoreRecorder = Singleton <ScoreRecorder> .Instance;
        bloodRecorder = Singleton <BloodRecorder> .Instance;
        diskFactory   = Singleton <DiskFactory> .Instance;
        actionManager = gameObject.AddComponent <MyActionManager>() as MyActionManager;
    }
コード例 #6
0
 public void PlayDisk()
 {
     MyActionManager.playDisk(user.round);
 }