Exemple #1
0
    void Start()
    {
        //初始化参数 一共3级 1级10层
        trial       = new int[3][];
        score_round = new int[3];
        int tmp = 0;

        for (int i = 0; i < 3; i++)
        {
            trial[i] = new int[10];
            for (int j = 0; j < 10; j++)
            {
                trial[i][j] = tmp;
                tmp        += 2 * (i + 1);
            }
            score_round[i] = trial[i][0];
        }

        SSDirector director = SSDirector.GetInstance();

        director.CurrentScenceController = this;
        disk_factory   = Singleton <DiskFactory> .Instance;
        score_recorder = Singleton <ScoreRecorder> .Instance;
        action_manager = gameObject.AddComponent <FlyActionManager>() as FlyActionManager;
        user_gui       = gameObject.AddComponent <UserGUI>() as UserGUI;
    }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     sceneController = SceneController.getInstance();
     sceneController.flyActionManager = this;
     flyActionManager = gameObject.AddComponent <FlyActionManager>() as FlyActionManager;
     kinematics       = gameObject.AddComponent <KinematicsActionManager>() as KinematicsActionManager;
 }
    void Start()
    {
        SSDirector director = SSDirector.GetInstance();

        director.CurrentScenceController = this;
        disk_factory   = Singleton <DiskFactory> .Instance;
        action_manager = gameObject.AddComponent <FlyActionManager>() as FlyActionManager;
        user_gui       = gameObject.AddComponent <UserGUI>() as UserGUI;
    }
Exemple #4
0
    void Start()
    {
        SSDirector director = SSDirector.getInstance();

        director.currentSceneController = this;
        diskFactory   = Singleton <DiskFactory> .Instance;
        actionManager = gameObject.AddComponent <FlyActionManager>() as FlyActionManager;
        actionManager.setRound(round);
        userGUI = gameObject.AddComponent <UserGUI>() as UserGUI;
    }
Exemple #5
0
  void Start()
  {
      SSDirector director = SSDirector.GetInstance();

      director.currentScenceController = this;
      diskFactory   = Singleton <DiskFactory> .Instance;
      scoreRecorder = Singleton <ScoreRecorder> .Instance;
      actionManager = gameObject.AddComponent <FlyActionManager>() as FlyActionManager;
      GUI           = gameObject.AddComponent <UserGUI>() as UserGUI;
  }
Exemple #6
0
    private void Awake()
    {
        Director director = Director.getInstance();

        director.currentSceneController = this;
        actionManager = gameObject.AddComponent <FlyActionManager>() as FlyActionManager;
        this.gameObject.AddComponent <DiskFactory>();
        this.gameObject.AddComponent <Judger>();
        diskFactory = Singleton <DiskFactory> .Instance;
        ui          = gameObject.AddComponent <UserUI>() as UserUI;
        judger      = Singleton <Judger> .Instance;
    }
Exemple #7
0
    private float speed = 2;     //飞碟发射间隔时间

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

        director.CurrentSceneControllor = this;
        df  = Singleton <DiskFactory> .Instance;
        sr  = gameObject.AddComponent <ScoreRecorder> () as ScoreRecorder;
        fam = gameObject.AddComponent <FlyActionManager>() as FlyActionManager;
        ug  = gameObject.AddComponent <UserGUI>() as UserGUI;
        rc  = gameObject.AddComponent <RoundControllor> () as RoundControllor;
        t   = speed;
    }
Exemple #8
0
    private GameState gameState = GameState.PAUSE;                    // 游戏状态

    // 场景初始化
    void Start()
    {
        Director director = Director.getInstance();

        director.currentSceneController = this;
        diskNumber    = 10;
        currentRound  = 1;
        roundNumber   = 3;
        frequency     = 2f;
        scoreRecorder = Singleton <ScoreRecorder> .Instance;
        diskFactory   = Singleton <DiskFactory> .Instance;
        actionManager = gameObject.AddComponent <FlyActionManager>();
        userGUI       = gameObject.AddComponent <UserGUI>() as UserGUI;
        director.setFPS(60);
    }
Exemple #9
0
 void Start()
 {
     action_manager     = gameObject.AddComponent <FlyActionManager>() as FlyActionManager;
     phy_action_manager = gameObject.AddComponent <PhysicsFlyActionManager>() as PhysicsFlyActionManager;
 }
 // Use this for initialization
 void Start()
 {
     flyManager      = gameObject.AddComponent <FlyActionManager>() as FlyActionManager;
     physicalManager = gameObject.AddComponent <PhysicalActionManager>() as PhysicalActionManager;
 }
 public void Start()
 {
     flyActionManager     = (FlyActionManager)gameObject.AddComponent <FlyActionManager>();
     physicsActionManager = (PhysicsActionManager)gameObject.AddComponent <PhysicsActionManager>();
 }