Exemple #1
0
    //初始化关卡道中所有敌人
    //void InitStageEnemyInRoad() {
    //    for (int i = 0; i < StageAudioManager.StageSongPlayer.Song.Notes.Count; i++)
    //    {
    //        string enmeyName = StageAudioManager.StageSongPlayer.Song.Notes[i].StageObjectType.ToString();
    //        if (StageAudioManager.StageSongPlayer.Song.Notes[i].StageObjectType == Note.ObjectType.EnmeyBullet
    //            || StageAudioManager.StageSongPlayer.Song.Notes[i].StageObjectType == Note.ObjectType.Command_ShowStageTitle)
    //        {
    //            //break;
    //        }
    //        else {
    //            GameObject enemy = GameObject.Instantiate(Resources.Load(CommandString.EnemyPrefabPath + enmeyName)) as GameObject;
    //            enemy.name = enmeyName + "_Num" + i;
    //            enemy.transform.parent = Camera.main.gameObject.transform;
    //            enemy.transform.localScale = Vector3.one;
    //            enemy.transform.position = Vector3.zero;
    //            EnemyBase enemyBase = enemy.GetComponent<EnemyBase>();
    //            enemyBase.Dir_CurSpeed = -Vector2.up;
    //            enemyBase.Speed_Cur = 80;
    //            enemyBase.SetSpeedCurve(StageAudioManager.StageSongPlayer.Song.Notes[i].Speed_Curve, StageAudioManager.StageSongPlayer.Song.Notes[i].DirX_Curve, StageAudioManager.StageSongPlayer.Song.Notes[i].DirY_Curve);
    //            enemyBase.setDeadValue(null, StageAudioManager.StageSongPlayer.Song.Notes[i].StageColor);
    //            Vector2 appearPos = GlobalData.ScreenZeroPoint + StageAudioManager.StageSongPlayer.Song.Notes[i].AppearPos;
    //            enemyBase.SetAppear(StageAudioManager.StageSongPlayer.Song.Notes[i].Time - 1, appearPos);
    //            enemy.SetActive(false);
    //            enemylist.Add(enemyBase);
    //        }


    //    }
    //}

    ////初始化关卡音乐数据
    //void InitStageBgmData() {
    //    switch (StageIndex) {
    //        case 1:
    //            stageBgm = Resources.Load(CommandString.BGMPath + "春色小路 ~ the Colorful Alley") as AudioClip;
    //            break;
    //        case 2:
    //            break;
    //        case 3:
    //            break;
    //        case 4:
    //            break;
    //        case 5:
    //            break;
    //        case 6:
    //            break;
    //    }
    //}

    //初始化关卡
    void InitStage()
    {
        stageState = enum_stageState.STATE_InBeforeRoad;
        GlobalData.SetScreenRect(obj_ScreenLeft.position, obj_ScreenTop.position, obj_ScreenRight.position, obj_ScreenBottom.position, obj_RecoverLine.position);
        CurStage         = StageList[StageIndex];
        CurStage.manager = this;
        //InitStageEnemyInRoad();
        //stageSoundPlayer.Play();
    }
Exemple #2
0
 public void SetStageState(enum_stageState state)
 {
     stageState = state;
 }