Example #1
0
 // ***************************************************************
 void Update()
 {
     // Sometimes Bonus and Boosts aren't there for Start (), so we connect with them in Update ()
     if (bonusGenerator == null)
     {
         bonusGenerator = GameObject.Find("Bonus Generator").GetComponent <BonusGenerator> ();
     }
     if (boostsGenerator == null)
     {
         boostsGenerator = GameObject.Find("Boosts Generator").GetComponent <BoostsGenerator> ();
     }
     // Once the Opening.cs animation concludes, start the tutorial
     if (GameController.started)
     {
         controlGTPTutorial();
     }
     // Check if the pics are all taken, if so put up the "return to dock icon"
     checkIfPictureGoalAchieved();
     // If picstaken and landed on the dock, you won!
     checkForLevelCompletion();
     // Update UI
     GameObject.Find("Captured Pics").GetComponent <Text> ().text = GameController.objectiveGained.ToString();
     if (GameObject.Find("landingCircle(Clone)"))
     {
         landingCircle.transform.Rotate(new Vector3(0f, 0f, 0.75f));
     }
     // Account for scared otters
     if (OtterGenerator.otterCount < 3)
     {
         OtterGenerator.createOtter(new Vector3(Random.Range(6f, 25f), -3.8f));
     }
 }
Example #2
0
        public void SetUp()
        {
            employees = new[]
            {
                new Employee(0, "Some Full Name", new DateTime(2016, 01, 01),
                             new DateTime(2019, 01, 01), new[] { 1 }, 30000),
                new Employee(1, "Some Full Name", new DateTime(2016, 01, 01),
                             new DateTime(2019, 01, 01), new[] { 2 }, 30000),
                new Employee(2, "Some Full Name", new DateTime(2016, 01, 01),
                             new DateTime(2019, 01, 01), new[] { 3 }, 30000),
                new Employee(3, "Some Full Name", new DateTime(2016, 01, 01),
                             new DateTime(2019, 01, 01), new[] { 4 }, 30000),
                new Employee(4, "Some Full Name", new DateTime(2016, 01, 01),
                             new DateTime(2019, 01, 01), new[] { 1, 2, 3, 4 }, 30000)
            };
            contracts = new[]
            {
                new Contract(0, new DateTime(2018, 01, 02), 100000),
                new Contract(1, new DateTime(2018, 01, 02), 100000),
                new Contract(2, new DateTime(2018, 01, 02), 100000),
                new Contract(3, new DateTime(2018, 01, 02), 100000),
                new Contract(4, new DateTime(2018, 01, 02), 100000)
            };
            startDate = new DateTime(2017, 01, 01);
            finalDate = new DateTime(2020, 01, 01);

            generator = () => BonusGenerator.Generate(employees, contracts, startDate, finalDate);
        }
Example #3
0
    // Start is called before the first frame update
    void Start()
    {
        bonusGenerator = GetComponent <BonusGenerator>();
        projGenerator  = GetComponent <ProjectilesGenerator>();
        gameMusic      = GetComponent <AudioSource>();

        CalculatePlayerResolution();
    }
    private void Start()
    {
        ObjectPooler = GetComponent <ObjectPool>();
        ImagePooler  = GetComponent <ImagePool>();

        players     = GetPlayers();
        startPoints = GetStartPoints();
        //MatchTime = gameInfo.gameTime;
        MATCH_DURATION = gameInfo.MatchTime;

        Debug.Log("GameInfo: " + gameInfo.ToString());

        AdjustCameraSize(gameInfo.MapSize);

        AdjustStartPositions(gameInfo.MapSize);

        countdown = MatchCountdown.Instance;
        countdown.SetMatchTime(MATCH_DURATION);
        countdown.ShowText("Match started", 3);

        //Debug.Log("Time: " + MatchTime + " <> " + gameInfo.gameTime);
        GetComponent <AsteroidsGenerator>().enabled = gameInfo.AsteroidsEnabled;

        if (gameInfo.BonusesEnbled)
        {
            BonusGenerator bonusGenerator = new BonusGenerator();
        }

        //Debug.Log("Bonuses: " + gameInfo.enableBonuses);
        for (int i = 0; i < players.Count; i++)
        {
            players[i].SetRespawnPoint(startPoints[i]);
            players[i].InitializeShip(i);
            players[i].onConnectionClose = OnPlayerConnectionClose;
        }

        if (PauseScreen.Instance != null)
        {
            PauseScreen.Instance.AddOnPauseEvent(delegate()
            {
                GameTime.Instance.SetTimeScale(0f);
                Cursor.visible = true;
            });

            PauseScreen.Instance.AddOnResumeEvent(delegate()
            {
                GameTime.Instance.SetTimeScaleTarget(1f);
                Cursor.visible = matchEnded;
            });
        }

        StartMatch();
    }
        public GeneratorsManager(IReportGeneratorOptions generatorOptions)
        {
            var contracts = CsvParser <Contract> .Parse(generatorOptions.ContractsFilepath, ContractParser.Parse)
                            .ToArray();

            var employees = CsvParser <Employee> .Parse(generatorOptions.EmployeesFilepath, EmployeeParser.Parse)
                            .ToArray();

            var bonuses = BonusGenerator.Generate(
                employees, contracts, generatorOptions.StartDateOfReport, generatorOptions.FinalDateOfReport)
                          .ToArray();

            reportGenerators = new Dictionary <GeneratorType, ReportGenerator>
            {
                [GeneratorType.Console] = new ConsoleReportGenerator(employees, bonuses),
                [GeneratorType.Csv]     = new CsvReportGenerator(employees, bonuses, generatorOptions.OutputCsvFilepath)
            };
        }
Example #6
0
 // ***************************************************************
 void Start()
 {
     // GameController variables init
     GameController.isTutorial      = true;
     GameController.missionInitials = "LTF";
     GameController.challenge       = "Learn how to fly!";
     // Update UI
     GameObject.Find("Circles Needed").GetComponent <Text>().text = Difficulty.objectiveNeeded.ToString();
     GameObject.Find("Circles Panel").SetActive(false);
     GameObject.Find("Points Panel").SetActive(false);
     // Drop in the tutorial prefab, connect to it, and set it to manual
     Instantiate(Resources.Load <GameObject>("UIPrefabs/LTFTutorial"));
     tutorialScript = GameObject.Find("LTFTutorial(Clone)").GetComponent <TutorialController>();
     tutorialScript.automaticTutorialSetting(false);
     // Connect to bonus generatory and boost generator
     bonusGenerator  = GameObject.Find("Bonus Generator").GetComponent <BonusGenerator>();
     boostsGenerator = GameObject.Find("Boosts Generator").GetComponent <BoostsGenerator>();
     // Make the first circle
     makeCircle(new Vector3(4.98f, -0.08f, 0f));
 }