Пример #1
0
 // Use this for initialization
 void Start()
 {
     scene         = Singleton <SceneController> .Instance;
     count         = Singleton <Count> .Instance;
     actionManager = Singleton <DiskActionManager> .Instance;
     recorder      = scene.recorder;
 }
Пример #2
0
 void Start()
 {
     action = SSDirector.getInstance().currentSceneController as IUserAction;
     speed  = 10;
     //sR = Singleton<ScoreRecorder>.Instance;//获取计分员单例
     sR = ScoreRecorder.getInstance();
 }
Пример #3
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;
    }
Пример #4
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = Singleton <ScoreRecorder> .Instance;
     }
 }
Пример #5
0
        void Start()
        {
            //积分器初始化
            m_scoreRecorder = new ScoreRecorder();

            //获取小鸟控制器
            m_birdController = FindObjectOfType <BirdController>();

            //声音控制器
            m_audioManager = new AudioManager();
            m_audioManager.PlayBGMusic();

            m_gameBehaviours = new List <IGameBehaviour>();
            m_gameBehaviours.Add(m_audioManager);

            //UI初始化
            m_topView = new TopView();
            m_topView.InitPreLoadView();
            m_resultView = new ResultView();
            m_resultView.InitPreLoadView();


            //画布管理器
            bgSkyBehaviours = this.gameObject.AddComponent <BGSkyBehaviours>();
            m_pipesFactory  = new PipesFactory();
            //先创建一组管子
            m_pipesFactory.CreatePipeGroup();
        }
Пример #6
0
    public int ufoNum = 1; //每一次发射飞碟的数目

    void Awake()
    {
        director = Director.getInstance();//单例类
        director.currentSceneCtroller = this;
        score = ScoreRecorder.getInstance();
        LoadResource();
    }
Пример #7
0
    private void Awake()
    {
        GameObject phaseManager = GameObject.FindGameObjectWithTag("Phase_Manager");

        scoreRecorder = phaseManager.GetComponent <ScoreRecorder>();
        phaseData     = phaseManager.GetComponent <RunTimePhaseData>();
    }
Пример #8
0
 // Use this for initialization
 protected void Start()
 {
     sceneController = (FirstSceneControl)Director.getInstance().currentSceneControl;
     diskFactory     = sceneController.GetComponent <DiskFactory>();
     scoreRecorder   = sceneController.scoreRecorder;
     sceneController.actionManager = this;//设置动作管理器
 }
Пример #9
0
 void Start()
 {
     SR      = Singleton <ScoreRecorder> .Instance;
     storage = new List <data> ();
     storage.Add(new data(1, 10, Color.blue));
     storage.Add(new data(2, 10, Color.green));
 }
Пример #10
0
 //实例化组件,加载资源
 void Start()
 {
     Director.getInstance().sceneController = this;
     patrol_factory = Singleton <PatrolFactory> .Instance;
     action_manager = (PatrolActionManager)gameObject.AddComponent <PatrolActionManager>();
     recorder       = Singleton <ScoreRecorder> .Instance;
     load();
 }
Пример #11
0
 // Use this for initialization
 void Awake()
 {
     Debug.Log("Start");
     SSDirector.getInstance().currentSceneController = this;
     DM = Singleton <DiskManager> .Instance;
     SR = Singleton <ScoreRecorder> .Instance;
     RD = Singleton <RoundData> .Instance;
 }
Пример #12
0
 void Start()
 {
     SSDirector.GetInstance().CurrentSceneController = this;
     diskFactory   = Singleton <DiskFactory> .Instance;
     scoreRecorder = Singleton <ScoreRecorder> .Instance;
     gameObject.AddComponent <FlyActionManager>();
     gameObject.AddComponent <UserGUI>();
 }
Пример #13
0
    void Awake()
    {
        setRound();
        factory  = Singleton <DiskFactory> .Instance;
        recorder = Singleton <ScoreRecorder> .Instance;

        countPersecond = (int)(1f / Time.deltaTime);
    }
Пример #14
0
 public void LoadResources()
 {
     Debug.Log("Loading Resources!!!");
     arrowFactory  = Singleton <Factory> .Instance;;
     scoreRecorder = Singleton <ScoreRecorder> .Instance;
     physisManager = GetComponent <PhysisActionManager>();
     target        = Instantiate <GameObject>(Resources.Load <GameObject>("Prefabs/target"));
 }
Пример #15
0
 private void OnTriggerExit(Collider other)
 {
     if (other.gameObject.tag == "Player")
     {
         isRun = false;
         ScoreRecorder.getInstance().addScore();
     }
 }
Пример #16
0
    public int ufoNum = 3; //每一次发射飞碟的数目

    void Awake()
    {
        director    = Director.getInstance();//单例类
        score       = ScoreRecorder.getInstance();
        diskFactory = DiskFactory.getInstance();
        director.setGenGameObject(this);
        diskList = new List <DiskData>();
    }
Пример #17
0
 public static ScoreRecorder getInstance()
 {
     if (instance == null)
     {
         instance = new ScoreRecorder();
     }
     return(instance);
 }
Пример #18
0
    void Awake()
    {
        state = State.STOP;
        SSDirector director = SSDirector.getInstance();

        director.currentSceneController = this;
        diskFactory   = Singleton <DiskFactory> .Instance;
        scoreRecorder = Singleton <ScoreRecorder> .Instance;
    }
Пример #19
0
 private void Start()
 {
     sceneController = (SceneController_Playing)SSDirector.getInstance().currentSceneController;
     recorder        = (ScoreRecorder)FindObjectOfType(typeof(ScoreRecorder));
     currentPlatform = "StartPlatform";
     Item            = GameObject.Find("EasyTouchControlsCanvas/Item").GetComponent <ETCButton>();
     Item.onPressed.AddListener(useItem);
     Item.onUp.AddListener(freeItem);
 }
Пример #20
0
 void Start(){
     SSDirector director = SSDirector.GetInstance();
     director.CurrentScenceController = this;
     patrol_factory = Singleton<PropFactory>.Instance;
     action_manager = gameObject.AddComponent<PatrolActionManager>() as PatrolActionManager;
     LoadResources();
     main_camera.GetComponent<CameraFlow>().follow = player;
     recorder = Singleton<ScoreRecorder>.Instance;
     player_speed *= 0.01f;
 }
Пример #21
0
    void Start()
    {
        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;
    }
Пример #22
0
 public void LoadResources()
 {
     Instantiate(Resources.Load <GameObject>("Prefabs/Maze"));
     action_manager = Singleton <PatrolActionManager> .Instance;
     patrol_factory = Singleton <PatrolFactory> .Instance;
     userGUI        = Singleton <UserGUI> .Instance;
     recorder       = Singleton <ScoreRecorder> .Instance;
     player         = Instantiate(Resources.Load("Prefabs/Player"), new Vector3(9, 9, -7), Quaternion.identity) as GameObject;
     patrols        = patrol_factory.GetPatrols();
 }
Пример #23
0
    void Start()
    {
        SSDirector director = SSDirector.GetInstance();

        director.currentSceneController = this;
        factory       = Singleton <PatroFactory> .GetInstance;
        actionManager = gameObject.AddComponent <PatrolActionManager> () as PatrolActionManager;
        LoadResources();
        recorder = Singleton <ScoreRecorder> .GetInstance;
    }
Пример #24
0
    void Start()
    {
        wall_sign = 1;
        SSDirector director = SSDirector.GetInstance();

        director.CurrentSceneController = this;
        patrol_factory = Singleton <PropFactory> .Instance;
        action_manager = gameObject.AddComponent <PatrolActionManager>() as PatrolActionManager;
        LoadResources();
        recorder = Singleton <ScoreRecorder> .Instance;
    }
Пример #25
0
    void Start()
    {
        SSDirector director = SSDirector.GetInstance();

        arrow_factory = Singleton <ArrowFactory> .Instance;
        recorder      = Singleton <ScoreRecorder> .Instance;
        director.CurrentScenceController = this;
        action_manager = gameObject.AddComponent <ArrowFlyActionManager>() as ArrowFlyActionManager;
        LoadResources();
        CreateWind();
    }
    void Awake()
    {
        SSDirector director = SSDirector.GetInstance();

        director.CurrentScenceController = this;
        patrol_factory = Singleton <PropFactory> .Instance;
        action_manager = gameObject.AddComponent <PatrolActionManager>() as PatrolActionManager;
        LoadResources();
        //main_camera.GetComponent<CameraHelpness>().follow = player;
        recorder = Singleton <ScoreRecorder> .Instance;
    }
Пример #27
0
    // Use this for initialization
    void Awake()
    {
        Director director = Director.getInstance();

        director.currentSceneController = this;
        numberOfDisks = 10;
        this.gameObject.AddComponent <ScoreRecorder>();
        this.gameObject.AddComponent <DiskFactory>();
        userGUI       = this.gameObject.AddComponent <UserGUI>();
        scoreRecorder = Singleton <ScoreRecorder> .Instance;
    }
Пример #28
0
    void Awake()
    {
        Director director = Director.getInstance();

        director.current = this;
        diskNumber       = 10;
        this.gameObject.AddComponent <ScoreRecorder>();
        this.gameObject.AddComponent <DiskFactory>();
        scoreRecorder = Singleton <ScoreRecorder> .Instance;
        director.current.loadResources();
    }
Пример #29
0
    void Awake()
    {
        SSDirector director = SSDirector.getInstance();

        director.currentScenceController = this;
        patrolFactory = Singleton <PatrolFactory> .Instance;
        LoadResources();
        gameState = GameState.BEGIN;
        PatrolCollide.catchSuccess += Gameover;
        scoreRecorder = Singleton <ScoreRecorder> .Instance;
    }
Пример #30
0
    void Awake()
    {
        SSDirector director = SSDirector.Director;

        director.currentController = this;
        diskCnt = 10;
        this.gameObject.AddComponent <ScoreRecorder>();
        this.gameObject.AddComponent <DiskFactory>();
        Recorder = Singleton <ScoreRecorder> .Instance;
        director.currentController.Load();
    }