Пример #1
0
    /*public void StartRecoverySpawnTimer(part){
     *      if (timerActive) {
     *              if (boxCount > 0) {
     *                      float partTime = currentLevel.time / (currentLevel.recoveryBoxes + 1);
     *                      //Debug.Log (partTime);
     *
     *                      recoveryBoxGateTimer.SetTimer (partTime);
     *                      StartCoroutine (recoveryBoxGateTimer.ActionAfterTimer (() => {
     *                              if(timerActive){
     *                                      ShipsController.instance.SpawnAbilityBox (1);
     *                                      StartRecoverySpawnTimer (boxCount - 1, currentLevel);
     *                              }else{
     *                                      recoveryBoxGateTimer.SetTimer(0);
     *                              }
     *                      }));
     *              }
     *      }
     * }*/

    public void InstantiateShipSettings()
    {
        nextBossIndex = 0;

        shipSettings.Clear();
        Level.ShipSpawnerSettings ship1 = new Level.ShipSpawnerSettings();
        ship1.shipID   = 1;
        ship1.priority = 1;
        shipSettings.Add(ship1);

        Level.ShipSpawnerSettings ship2 = new Level.ShipSpawnerSettings();
        ship2.shipID   = 2;
        ship2.priority = 2;
        shipSettings.Add(ship2);

        Level.ShipSpawnerSettings ship3 = new Level.ShipSpawnerSettings();
        ship3.shipID   = 3;
        ship3.priority = 3;
        shipSettings.Add(ship3);

        Level.ShipSpawnerSettings ship4 = new Level.ShipSpawnerSettings();
        ship4.shipID   = 4;
        ship4.priority = 4;
        shipSettings.Add(ship4);

        Level.ShipSpawnerSettings ship5 = new Level.ShipSpawnerSettings();
        ship5.shipID   = 5;
        ship5.priority = 5;
        shipSettings.Add(ship5);

        Level.ShipSpawnerSettings ship6 = new Level.ShipSpawnerSettings();
        ship6.shipID   = 6;
        ship6.priority = 6;
        shipSettings.Add(ship6);
    }
Пример #2
0
 float GetShipHealth(Level.ShipSpawnerSettings shipSetting)
 {
     //Debug.Log ("ship_" + shipSetting.shipID);
     //Debug.Log (DamageHealthParamController.instance.GetExplodeObjectById ("ship_" + shipSetting.shipID));
     return(DamageHealthParamController.instance.GetExplodeObjectById("ship_" + shipSetting.shipID).health);
 }