Exemplo n.º 1
0
 /// <summary>
 /// Méthode lancée automatiquement par Unity
 /// lors du chargement du script
 /// </summary>
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Exemplo n.º 2
0
 private void Start()
 {
     man        = tempo.GetComponent <TempoManager>();
     tapSound   = SoundUtils.MakeSource(tapSound, gameObject.AddComponent <AudioSource>());
     informer   = TempoStartInformer.GetInstance();
     textShower = GetComponent <FlyingTextShower>();
 }
Exemplo n.º 3
0
        /// <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>();
            }
        }
Exemplo n.º 4
0
        /// <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;
        }
Exemplo n.º 5
0
 void Awake()
 {
     instance = this;
 }
Exemplo n.º 6
0
    void Start()
    {
        mLevelManager = gameObject.GetComponent<LevelManager>();
        mTempoManager = gameObject.GetComponent<TempoManager>();

        mCurrentWaveCount = 1;
        mWaveList = new List<Wave>();
        LoadSize();
        LoadWaves();
    }
Exemplo n.º 7
0
 // Start is called before the first frame update
 void Start()
 {
     tempoManager = TempoManager.instance;
     text         = GetComponent <TextMeshProUGUI>();
 }
Exemplo n.º 8
0
 void Start()
 {
     TempoStartInformer.GetInstance().RegisterReceiver(this);
     manager = GameObject.Find("Tempo").GetComponent <TempoManager>();
 }
Exemplo n.º 9
0
    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;
        }
    }
Exemplo n.º 10
0
 /// <summary>
 /// BPM定義を追加する
 /// </summary>
 public void AddBPMDefinition(string bpmKey, string bpmString)
 {
     TempoManager.AddBPMDefinition(bpmKey, bpmString);
 }
Exemplo n.º 11
0
 void Awake()
 {
     Inst = this;
 }
Exemplo n.º 12
0
 // Start is called before the first frame update
 void Start()
 {
     focusMaterial = focusUnoptimalMaterial;
     tempoManager  = TempoManager.instance;
     meshRenderer  = gameObject.GetComponent <MeshRenderer>();
 }
Exemplo n.º 13
0
 /// <summary>
 /// 指定場所にBPM変化を追加する
 /// </summary>
 public void AddBPMChange(int bpm, int measure, int position)
 {
     TempoManager.AddBPMChange(bpm, measure, position);
 }
Exemplo n.º 14
0
 /// <summary>
 /// 指定場所にBPM変化を追加する
 /// </summary>
 public void AddBPMChange(string bpmKey, int measure, int position)
 {
     TempoManager.AddBPMChange(bpmKey, measure, position);
 }
Exemplo n.º 15
0
 void Start()
 {
     mTempoManager = GameObject.Find("Main Camera").GetComponent<TempoManager>();
     initialPostion = transform.position;
 }
Exemplo n.º 16
0
 public void SetManager(TempoManager man)
 {
     manager = man;
 }
Exemplo n.º 17
0
    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;
    }