예제 #1
0
 void Start() // стандартная функция Unity, запускается 1 раз в начале
 {
     DebugPanel.AddDelegate("Complete the level", () => {
         if (isPlaying)
         {
             reachedTheTarget = true;
             movesCount       = 0;
             score            = LevelProfile.main.thirdStarScore;
         }
     });
     DebugPanel.AddDelegate("Fail the level", () => {
         if (isPlaying)
         {
             reachedTheTarget        = false;
             limitationRoutineIsOver = true;
             movesCount = 0;
         }
     });
     DebugPanel.AddDelegate("Add a bomb", () => {
         if (isPlaying)
         {
             List <string> powerups = chipInfos.Select(x => x.name).ToList();
             powerups.Remove("SimpleChip");
             if (powerups.Contains("Sugar"))
             {
                 powerups.Remove("Sugar");
             }
             if (powerups.Contains("Stone"))
             {
                 powerups.Remove("Stone");
             }
             FieldAssistant.main.AddPowerup(powerups[Random.Range(0, powerups.Count)]);
         }
     });
 }
예제 #2
0
 void Awake()
 {
     onAdClose += OnAdClose;
     DebugPanel.AddDelegate("Show Video Ads", () => {
         ShowAds();
     });
 }
예제 #3
0
 void Awake()
 {
     main = this;
     DebugPanel.AddDelegate("Add some seeds", () => {
         main.Purchase(0, "seed", 100);
     });
 }
예제 #4
0
    void Awake()
    {
        main = this;

        UIAssistant.onShowPage += TryToSaveProfile;

        DebugPanel.AddDelegate("Clear Data", ClearData);
        DebugPanel.AddDelegate("Unlock all levels", UnlockAllLevels);
    }
예제 #5
0
 public void F()
 {
     DebugPanel.AddDelegate("Kill the enemy", () => Debug.Log("Enemy is killed!"));
 }
예제 #6
0
 void Awake()
 {
     DebugPanel.AddDelegate("Add some seeds", () => {
         Purchase(0, "seed", 100);
     });
 }