// Use this for initialization void Start() { scene = Singleton <SceneController> .Instance; count = Singleton <Count> .Instance; actionManager = Singleton <DiskActionManager> .Instance; recorder = scene.recorder; }
void Start() { action = SSDirector.getInstance().currentSceneController as IUserAction; speed = 10; //sR = Singleton<ScoreRecorder>.Instance;//获取计分员单例 sR = ScoreRecorder.getInstance(); }
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; }
void Awake() { if (_instance == null) { _instance = Singleton <ScoreRecorder> .Instance; } }
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(); }
public int ufoNum = 1; //每一次发射飞碟的数目 void Awake() { director = Director.getInstance();//单例类 director.currentSceneCtroller = this; score = ScoreRecorder.getInstance(); LoadResource(); }
private void Awake() { GameObject phaseManager = GameObject.FindGameObjectWithTag("Phase_Manager"); scoreRecorder = phaseManager.GetComponent <ScoreRecorder>(); phaseData = phaseManager.GetComponent <RunTimePhaseData>(); }
// Use this for initialization protected void Start() { sceneController = (FirstSceneControl)Director.getInstance().currentSceneControl; diskFactory = sceneController.GetComponent <DiskFactory>(); scoreRecorder = sceneController.scoreRecorder; sceneController.actionManager = this;//设置动作管理器 }
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)); }
//实例化组件,加载资源 void Start() { Director.getInstance().sceneController = this; patrol_factory = Singleton <PatrolFactory> .Instance; action_manager = (PatrolActionManager)gameObject.AddComponent <PatrolActionManager>(); recorder = Singleton <ScoreRecorder> .Instance; load(); }
// 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; }
void Start() { SSDirector.GetInstance().CurrentSceneController = this; diskFactory = Singleton <DiskFactory> .Instance; scoreRecorder = Singleton <ScoreRecorder> .Instance; gameObject.AddComponent <FlyActionManager>(); gameObject.AddComponent <UserGUI>(); }
void Awake() { setRound(); factory = Singleton <DiskFactory> .Instance; recorder = Singleton <ScoreRecorder> .Instance; countPersecond = (int)(1f / Time.deltaTime); }
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")); }
private void OnTriggerExit(Collider other) { if (other.gameObject.tag == "Player") { isRun = false; ScoreRecorder.getInstance().addScore(); } }
public int ufoNum = 3; //每一次发射飞碟的数目 void Awake() { director = Director.getInstance();//单例类 score = ScoreRecorder.getInstance(); diskFactory = DiskFactory.getInstance(); director.setGenGameObject(this); diskList = new List <DiskData>(); }
public static ScoreRecorder getInstance() { if (instance == null) { instance = new ScoreRecorder(); } return(instance); }
void Awake() { state = State.STOP; SSDirector director = SSDirector.getInstance(); director.currentSceneController = this; diskFactory = Singleton <DiskFactory> .Instance; scoreRecorder = Singleton <ScoreRecorder> .Instance; }
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); }
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; }
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; }
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(); }
void Start() { SSDirector director = SSDirector.GetInstance(); director.currentSceneController = this; factory = Singleton <PatroFactory> .GetInstance; actionManager = gameObject.AddComponent <PatrolActionManager> () as PatrolActionManager; LoadResources(); recorder = Singleton <ScoreRecorder> .GetInstance; }
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; }
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; }
// 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; }
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(); }
void Awake() { SSDirector director = SSDirector.getInstance(); director.currentScenceController = this; patrolFactory = Singleton <PatrolFactory> .Instance; LoadResources(); gameState = GameState.BEGIN; PatrolCollide.catchSuccess += Gameover; scoreRecorder = Singleton <ScoreRecorder> .Instance; }
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(); }