Beispiel #1
0
 public void KillSheep()
 {
     callAchievement(AchievementEvent.sheepDeath);
     displayInfo(Strings.IngameInterface["SheepEaten"], 2);
     if (EnclosureManager.NbSheeps() <= 0)
     {
         GameOver();
     }
 }
Beispiel #2
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        else if (Instance != this)
        {
            Destroy(gameObject);
        }
    }
Beispiel #3
0
 private void Start()
 {
     soundManager      = gameObject.GetComponent <SoundManager>();
     _enclosureManager = EnclosureManager.Instance;
     cycleManager      = CycleManagerObject.GetComponent <CycleManager>();
     cycleManager.SubscribCycle(this);
     cycleManager.GoToAngle(1, 30);
     TotalSheeps    = GameVariables.Initialisation.numberSheeps;
     Time.timeScale = 1;
     GetComponent <DifficultyManager>().SetDiffilculty();
     Cursor.visible   = false;
     Cursor.lockState = CursorLockMode.Locked;
     if (SProfilePlayer.getInstance().AchievementsManager.GetAchievementByName("Player").IsComplete())
     {
         TotalSuperSheeps = 1;
     }
     else
     {
         TotalSuperSheeps = 0;
     }
     DayStart();
 }