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)]); } }); }
void Awake() { onAdClose += OnAdClose; DebugPanel.AddDelegate("Show Video Ads", () => { ShowAds(); }); }
void Awake() { main = this; DebugPanel.AddDelegate("Add some seeds", () => { main.Purchase(0, "seed", 100); }); }
void Awake() { main = this; UIAssistant.onShowPage += TryToSaveProfile; DebugPanel.AddDelegate("Clear Data", ClearData); DebugPanel.AddDelegate("Unlock all levels", UnlockAllLevels); }
public void F() { DebugPanel.AddDelegate("Kill the enemy", () => Debug.Log("Enemy is killed!")); }
void Awake() { DebugPanel.AddDelegate("Add some seeds", () => { Purchase(0, "seed", 100); }); }