Пример #1
0
    private void Start()
    {
        inputActions = GetComponent <IInputActions>();
        selectRocket = GetComponent <ISelectRocket>();

        updateFireTimer   = new UpdateTimer(3, false);
        updateSensorTimer = new UpdateTimer(5, false);

        selectRocket.SelectRocket(0);

        overlapColliders = Physics.OverlapSphere(transform.position, aiRadius, 1 << LayerMask.NameToLayer(Constants.PLANET_LAYER));

        this.cameraMain = Camera.main;
    }
Пример #2
0
        public MainViewModel(IMessageBus messageBus, IGroupParser groupParser,
                             IFileHandler fileHandler, IEnumerable <Languages> languages, IUpdateTimer updateTimer,
                             IRaidCategorizer raidCategorizer, FireteamViewModelFactory fireteamViewModelFactory)
        {
            _messageBus               = messageBus;
            _groupParser              = groupParser;
            _fileHandler              = fileHandler;
            _updateTimer              = updateTimer;
            _raidCategorizer          = raidCategorizer;
            _fireteamViewModelFactory = fireteamViewModelFactory;

            Languages        = new List <Languages>(languages);
            SelectedLanguage = Languages.FirstOrDefault();

            LoadGroupsFromFile();

            UpdateCommand = new RelayCommand(_ => UpdateGroups(), _ => !IsUpdatingGroups);
            OpenCommand   = new RelayCommand(OpenDetail, _ => !IsUpdatingGroups);
            UpdateGroups();

            UpdateTime = 0;
            _updateTimer.TimeoutAction = () => UpdateUpdateTime();
            _updateTimer.StartTimer(1000);
        }
Пример #3
0
 private void Start()
 {
     this.updateTimer = new UpdateTimer(3f, false);
 }