/// <summary> /// Méthode lancée automatiquement par Unity /// lors du chargement du script /// </summary> void Awake() { if (instance == null) { instance = this; } }
private void Start() { man = tempo.GetComponent <TempoManager>(); tapSound = SoundUtils.MakeSource(tapSound, gameObject.AddComponent <AudioSource>()); informer = TempoStartInformer.GetInstance(); textShower = GetComponent <FlyingTextShower>(); }
/// <summary> /// 譜面読み込み開始時の初期化処理 /// </summary> public void InitializeLoad() { IsLoadCompleted = false; noteList.Clear(); activeNoteList.Clear(); TempoManager.Initialize(); foreach (MusicPlaceKind place in Enum.GetValues(typeof(MusicPlaceKind))) { noteList[place] = new List <MusicNote>(); } }
/// <summary> /// 譜面読み込み完了後や再プレイ時にプレイ開始するための初期化処理 /// </summary> public void InitializePlay() { // 読み込んだノーツをアクティブなノーツとして登録 foreach (MusicPlaceKind place in Enum.GetValues(typeof(MusicPlaceKind))) { activeNoteList[place] = new List <MusicNote>(noteList[place]); noteTopIndexList[place] = (activeNoteList[place].Count != 0) ? 0 : EndOfNoteIndex; } // 登録したBPM変化から予め時間を計算しておく TempoManager.SetStartBpm(StartBpm); TempoManager.PrecomputeTime(); IsLoadCompleted = true; }
void Awake() { instance = this; }
void Start() { mLevelManager = gameObject.GetComponent<LevelManager>(); mTempoManager = gameObject.GetComponent<TempoManager>(); mCurrentWaveCount = 1; mWaveList = new List<Wave>(); LoadSize(); LoadWaves(); }
// Start is called before the first frame update void Start() { tempoManager = TempoManager.instance; text = GetComponent <TextMeshProUGUI>(); }
void Start() { TempoStartInformer.GetInstance().RegisterReceiver(this); manager = GameObject.Find("Tempo").GetComponent <TempoManager>(); }
void Start() { mTileManager = gameObject.GetComponent<TileManager>(); mWaveManager = gameObject.GetComponent<WaveManager>(); mTempoManager = gameObject.GetComponent<TempoManager>(); mLevelManager = gameObject.GetComponent<LevelManager>(); mTilePaths = new TilePath[2]; if (mTileManager) { mLoadSuccess = true; mEnemyList = new List<GameObject>(); mTilePaths[0] = mTileManager.GetTilePathOne(); mTilePaths[1] = mTileManager.GetTilePathTwo(); mTimer = 0.0f; } }
/// <summary> /// BPM定義を追加する /// </summary> public void AddBPMDefinition(string bpmKey, string bpmString) { TempoManager.AddBPMDefinition(bpmKey, bpmString); }
void Awake() { Inst = this; }
// Start is called before the first frame update void Start() { focusMaterial = focusUnoptimalMaterial; tempoManager = TempoManager.instance; meshRenderer = gameObject.GetComponent <MeshRenderer>(); }
/// <summary> /// 指定場所にBPM変化を追加する /// </summary> public void AddBPMChange(int bpm, int measure, int position) { TempoManager.AddBPMChange(bpm, measure, position); }
/// <summary> /// 指定場所にBPM変化を追加する /// </summary> public void AddBPMChange(string bpmKey, int measure, int position) { TempoManager.AddBPMChange(bpmKey, measure, position); }
void Start() { mTempoManager = GameObject.Find("Main Camera").GetComponent<TempoManager>(); initialPostion = transform.position; }
public void SetManager(TempoManager man) { manager = man; }
void Start() { if (fireEvery > 12) fireEvery = 12; mEnemyManager = GameObject.Find("Main Camera").GetComponent<EnemyManager>(); mTempoManager = GameObject.Find("Main Camera").GetComponent<TempoManager>(); mNextTileCount = (int)tile.GetComponent<Tile>().GetTileCoord().x;//0;//mTempoManager.GetCurrentTileCount(); mTowerUpper = transform.FindChild("TowerUpper").gameObject; gameObject.AddComponent<AudioSource>(); gameObject.GetComponent<AudioSource>().playOnAwake = false; gameObject.transform.Rotate(0.0f, 180.0f, 0.0f); speed *= mTempoManager.GetBeatsPerMinuteDivided(); //print(range); //print(tile.renderer.bounds.size.x); mRange = (range * tile.renderer.bounds.size.x) + (tile.renderer.bounds.size.x / 2.0f); mCurrentTile = (int)tile.GetComponent<Tile>().GetTileCoord().x; //towerIcon = Instantiate(towerIcon) as GameObject; //towerIcon.active = false; mFire = new bool[FIRE_COUNT]; mFire[0] = fireOne; mFire[1] = fireTwo; mFire[2] = fireThree; mFire[3] = fireFour; for (int i = 0; i < FIRE_COUNT; i++) fireRate += (mFire[i] ? 1 : 0); if (highVolume == 0) highVolume = 1.0f; if (lowVolume == 0) lowVolume = 0.1f; mPrevTileCount = 0; mHit = false; }