Esempio n. 1
0
    void Start()
    {
        pool = GameObject.Find("GameManager").GetComponent <PoolControl>();

        maxHealth = GameControl.control.GetMaxHealth();
        GameControl.control.ChangeHealth(maxHealth);
    }
Esempio n. 2
0
    //Initialize game values and references
    void Init()
    {
        if (bulletPool == null)
        {
            bulletPool = transform.GetComponent <PoolControl>();
        }
        if (bulletPool == null)
        {
            Debug.LogError("Error: BulletPool not Found");
        }

        gameState = GameState.INTRO;          //Intro state didn't need aditiona behaviour but keep the game paused
        StartCoroutine(CreateSquadron());
        explosionAU = transform.Find("EnemyAudio").GetComponent <AudioSource>();

        if (explosionAU == null)
        {
            Debug.LogError("ERROR: EnemyAudio");
        }

        //Level = 1;
        //Score = 0;
        //Lives = 3;

        Level = PlayerPrefs.GetInt("level", 0);
        Score = PlayerPrefs.GetInt("score", 0);
        Lives = PlayerPrefs.GetInt("lives", 0);

        //initialSpeed += (speedIncrement * 2);
        enemySpeed += (speedIncrement * Level * 2);

        //initialSpeed = enemySpeed;
    }
Esempio n. 3
0
        private static PoolControl mPoolControl = new PoolControl();//实体池mono obj

        public static PoolControl CreatePoolControl()
        {
            PoolControl pc = new PoolControl();

            pc.CreateTag();
            return(pc);
        }
Esempio n. 4
0
 public PublicController(
     ILogger <PublicController> logger,
     PoolControl poolControl,
     IHardwareManager hardwareManager)
 {
     this.logger          = logger;
     this.poolControl     = poolControl;
     this.hardwareManager = hardwareManager;
 }
Esempio n. 5
0
        public IndexModel(PoolControl poolControl, IViewLocalizer localizer)
        {
            this.State              = poolControl.GetPoolControlInformation();
            this.GeneralState       = GeneralState.ConvertFromPoolState(poolControl.GetPoolControlInformation());
            this.TemperatureRunTime = this.State.PoolSettings.TemperatureRunTime.ToArray();
            this.PumpingCycles      = this.State.PoolSettings.WorkingMode == PoolWorkingMode.Summer
                ? this.State.PoolSettings.SummerPumpingCycles
                : this.State.PoolSettings.WinterPumpingCycles;

            var chartOptions = new Highcharts
            {
                Title = new Title
                {
                    Text = ""
                },
                XAxis = new List <XAxis>()
                {
                    new XAxis()
                    {
                        Title = new XAxisTitle()
                        {
                            Text = "°C"
                        }
                    }
                },
                YAxis = new List <YAxis>()
                {
                    new YAxis()
                    {
                        Title = new YAxisTitle()
                        {
                            Text = "h"
                        }
                    }
                },
                Series = new List <Series>()
                {
                    new AreaSeries
                    {
                        Name = "h",
                        Data = this.State.PoolSettings.TemperatureRunTime
                               .Select(d => new AreaSeriesData()
                        {
                            X = d.Temperature, Y = d.RunTimeHours
                        })
                               .ToList(),
                    }
                }
            };

            chartOptions.ID    = "chart";
            this.ChartRenderer = new HighchartsRenderer(chartOptions);
        }
Esempio n. 6
0
    void Start()
    {
        pool = GameObject.Find("GameManager").GetComponent <PoolControl>();

        thisTag = gameObject.tag;

        if (thisTag == "Enemy")
        {
            value = GameControl.control.GetDamage();
        }
        else
        {
            value = GameControl.control.GetPointValue(valueIndex);
        }
    }
Esempio n. 7
0
        public VariablesModel(PoolControl poolControl, IHardwareManager hardwareManager)
        {
            var state = poolControl.GetPoolControlInformation().SystemState;

            this.Outputs = hardwareManager.GetOutputs().ToArray();

            this.Variables = new List <VariableItem>();
            this.Variables.Add(VariableItem.Create("Température extérieure", state.AirTemperature));
            this.Variables.Add(VariableItem.Create("Température eau brute (sonde)", state.WaterTemperature));
            this.Variables.Add(VariableItem.Create("Température min jour", state.PoolTemperatureMinOfTheDay));
            this.Variables.Add(VariableItem.Create("Température max jour", state.PoolTemperatureMaxOfTheDay));
            this.Variables.Add(VariableItem.Create("Température de consigne", state.PoolTemperatureDecision));
            this.Variables.Add(VariableItem.Create("Température du bassin", state.PoolTemperature));
            this.Variables.Add(VariableItem.Create("Durée de filtration/jour", state.PumpingDurationPerDayInHours));
            this.Variables.Add(VariableItem.Create("Pompe", state.Pump));
        }
Esempio n. 8
0
        public SettingsModel(PoolControl poolControl, IHardwareManager hardwareManager)
        {
            this.poolControl = poolControl;

            this.LoadData();
        }
Esempio n. 9
0
 public ClientController(PoolControl poolControl, IHardwareManager hardwareManager)
 {
     this.poolControl     = poolControl;
     this.hardwareManager = hardwareManager;
 }
 public SettingsEditorModel(PoolControl poolControl)
 {
     this.poolControl = poolControl;
 }
Esempio n. 11
0
 public MainBackgroundService(ILogger <MainBackgroundService> logger, PoolControl control)
 {
     this.logger  = logger;
     this.control = control;
 }