Пример #1
0
 protected virtual void Awake()
 {
     onLevelVictory      = Harmony.Finder.OnLevelVictory;
     onLevelFailed       = Harmony.Finder.OnLevelFailed;
     onLevelChange       = Harmony.Finder.OnLevelChange;
     onCampaignFailed    = Harmony.Finder.OnCampaignFailed;
     levelLoader         = Harmony.Finder.LevelLoader;
     saveController      = Harmony.Finder.SaveController;
     gameController      = Harmony.Finder.GameController;
     gameSettings        = Harmony.Finder.GameSettings;
     grid                = Harmony.Finder.GridController;
     cinematicController = GetComponent <CinematicController>();
     computerPlayer      = new ComputerPlayer(Harmony.Finder.GameController.ChoiceRange);
     humanPlayer         = new HumanPlayer();
     levelName           = gameObject.scene.name;
     endGameCredits      = GetComponentInChildren <EndGameCreditsController>();
     uiController        = Harmony.Finder.UIController;
     if (protagonistGameObject == null)
     {
         Debug.LogError("Missing ProtagonistGameObject in LevelController!");
     }
     if (endGameCredits != null)
     {
         endGameCredits.gameObject.SetActive(false);
     }
     coroutineStarter      = Harmony.Finder.CoroutineStarter;
     enemyRangeController  = Harmony.Finder.EnemyRangeController;
     achievementController = Harmony.Finder.AchievementController;
 }
Пример #2
0
 protected virtual void Awake()
 {
     tileImage            = GetComponent <Image>();
     tileSprite           = GetComponent <TileSprite>();
     tilePathSprite       = GetComponentInChildren <SpriteRenderer>();
     gridController       = transform.parent.GetComponent <GridController>();
     uiController         = Harmony.Finder.UIController;
     enemyRangeController = Harmony.Finder.EnemyRangeController;
     playerClickManager   = Harmony.Finder.PlayerClickManager;
 }