public long GetDefence() { var result = GetDefenceInternal(); result = Convert.ToInt64(result * EffectService.GetDefenceKoef()); result += EffectService.GetDefenceBonus(); return(result); }
public Task GetStatus() { StatusViewModel vm = new StatusViewModel(); vm.bpm = StreamingSetup.GetBPM(); vm.IsAutoMode = EffectService.IsAutoModeRunning(); return(Clients.All.SendAsync("Status", vm)); }
public void Initialize() { LocationService = new LocationService(LocationsInfo); ExperienceManager = new ExperienceManager(this); InventoryService = new InventoryService(Inventory); CubeService = new CubeService(this); SkillService = new SkillService(this, Skills); EffectService = new EffectService(this, Effects); }
public async Task Disconnect() { EffectService.CancelAllEffects(); StreamingSetup.Disconnect(); await Clients.All.SendAsync("effects", new EffectsVM()); await Clients.All.SendAsync("StatusMsg", "DISCONNECTED..."); GetStatus(); }
public void SetUp() { var unitOfWorkFactory = Substitute.For <IUnitOfWorkFactory>(); _unitOfWork = Substitute.For <IUnitOfWork>(); unitOfWorkFactory.CreateUnitOfWork().Returns(_unitOfWork); _effectRepository = Substitute.For <IEffectRepository>(); _unitOfWork.Effects.Returns(_effectRepository); _effectSubCategoryRepository = Substitute.For <IEffectSubCategoryRepository>(); _unitOfWork.EffectSubCategories.Returns(_effectSubCategoryRepository); _effectTypeRepository = Substitute.For <IEffectTypeRepository>(); _unitOfWork.EffectTypes.Returns(_effectTypeRepository); _authorizationUtil = Substitute.For <IAuthorizationUtil>(); _effectService = new EffectService(unitOfWorkFactory, _authorizationUtil); }
public async Task GetStatus() { var configs = await StreamingSetup.GetGroupConfigurationsAsync(); StatusViewModel vm = new StatusViewModel(); vm.bpm = StreamingSetup.GetBPM(); vm.IsAutoMode = EffectService.IsAutoModeRunning(); vm.AutoModeHasRandomEffects = EffectService.AutoModeHasRandomEffects; vm.ShowDisconnect = !(StreamingSetup.CurrentConnection?.HideDisconnect ?? false); vm.GroupNames = configs.Select(x => x.Name).ToList(); vm.CurrentGroup = StreamingSetup.CurrentConnection?.Name; await Clients.All.SendAsync("Status", vm); }
public void GetEffects(bool forAll) { if (StreamingSetup.Layers?.Count > 0) { var allEffects = EffectService.GetEffectViewModels(); if (forAll) { Clients.All.SendAsync("effects", allEffects); } else { Clients.Caller.SendAsync("effects", allEffects); } } }
public Task GetEffects(bool forAll) { if (StreamingSetup.Layers?.Count > 0) { var allEffects = EffectService.GetEffectViewModels(); if (forAll) { return(Clients.All.SendAsync("effects", allEffects)); } else { return(Clients.Caller.SendAsync("effects", allEffects)); } } return(Task.CompletedTask); }
public Shaders() { Content.RootDirectory = "Content"; // Komponenten erstellen camera = CameraFactory.CreateCamera(this, CameraType.FreeLookCamera); shape = new Shape(this); room = new Shape(this); lightService = new LightService(this); crosshair = new Crosshair(this) { Visible = false }; effectService = new EffectService(); collisionDetection = new CollisionDetection(this); // Komponenten zur Engine hinzufügen Components.Add(new CameraHandler(this) { Camera = camera }); Components.Add(camera); Components.Add(lightService); Components.Add(shape); Components.Add(room); Components.Add(crosshair); Components.Add(collisionDetection); // Services hinzufügen Services.AddService(typeof(ICameraService), camera); Services.AddService(typeof(ILightService), lightService); Services.AddService(typeof(IEffectService), effectService); // Grafik-Einstellungen graphics = new GraphicsDeviceManager(this); graphics.SynchronizeWithVerticalRetrace = true; graphics.PreferMultiSampling = true; graphics.IsFullScreen = true; graphics.PreferredBackBufferWidth = 1366; graphics.PreferredBackBufferHeight = 768; IsFixedTimeStep = true; }
// Use this for initialization void Start() { MonsterHealthBar = GameObject.Find("MonsterStatus").GetComponentInChildren <SimpleHealthBar>(); var gameState = GameObject.Find("GameState").GetComponent <GameState>(); _player = gameState.Player; _skillService = _player.SkillService; _effectService = _player.EffectService; _resourceManager = FindObjectOfType <ResourceManager>(); _locationService = _player.LocationService; _canvasTransform = GameObject.Find("Canvas").transform; _defaultSkillCooldownBar = DefaultSkillSlot.GetComponentInChildren <SimpleHealthBar>(); _activeSkillCooldownBars = ActiveSkillSlots.Select(s => s.GetComponentInChildren <SimpleHealthBar>()).ToArray(); EventsSubscribe(); _player.Respawn(); _skillService.StartBattle(); NewMonster(); }
public void StartEffect(string typeName, string colorHex) { EffectService.StartEffect(typeName, colorHex); }
public void StartAutoMode() { EffectService.StartAutoMode(); GetStatus(); }
public void Beat(double intensity) { EffectService.Beat(intensity); }
public void Beat([FromBody] double intensity) { EffectService.Beat(intensity); }
public void OnDeathActivate(object obj, EventArgs e) { EffectService.RemoveAll(); }
public void StartGroupEffect(string typeName, string colorHex, string groupName, string iteratorMode, string secondaryIteratorMode) { EffectService.StartEffect(typeName, colorHex, groupName, Enum.Parse <IteratorEffectMode>(iteratorMode), Enum.Parse <IteratorEffectMode>(secondaryIteratorMode)); }
public void StartRandom() { EffectService.StartRandomEffect(); }
public Task StopEffects() { EffectService.StopAutoMode(); EffectService.StopEffects(); return(GetStatus()); }
public async Task Touch(double x, double y) { EffectService.StartRandomTouchEffect(x, y); }
static EffectTreeViewModel() { EffectService = new EffectService(); }