public void UpdateForce(ContainerApp container, ControllerScreen controller) { _targetAvailable = container.SpinsAvailable; _targetTotal = container.SpinsTotal; StartAnimationProcess(controller); }
public void UpdateForce(ContainerApp container, ControllerScreen controller) { _targetPeriod = container.RestorePeriod; _targetSpins = container.SpinsToRestore; StartAnimationProcess(controller); }
public void Update(ContainerApp container, ControllerScreen controller) { _target = container.Coins; if (_target == _current) { return; } StartAnimationProcess(controller); }
public void UpdateForce(ContainerApp container, ControllerScreen controller) { var screen = _context.Resolve <ControllerScreen>(); var data = _context.Resolve <ContainerApp>(); for (var index = 0; index < Extensions.BARRELS_I; index++) { _context.Resolve <IServicePhysics>().StateResetIdle(data.PhysicsState[index]); ResetSprites(screen.ControllerBarrel[index].SlotControllers, data.PhysicsState[index]); } }
public void Update(ContainerApp container, ControllerScreen controller) { _targetPeriod = container.RestorePeriod; _targetSpins = container.SpinsToRestore; if (_currentSpins == _targetSpins && _currentPeriod == _targetPeriod) { return; } StartAnimationProcess(controller); }
public void Update(ContainerApp container, ControllerScreen controller) { _targetAvailable = container.SpinsAvailable; _targetTotal = container.SpinsTotal; if (_currentAvailable == _targetAvailable && _targetTotal == _currentTotal) { return; } StartAnimationProcess(controller); }
public void UpdateForce(ContainerApp container, ControllerScreen controller) { _target = container.Coins; StartAnimationProcess(controller); }
public ContainerController(IAuth authUtil, ContainerApp app) : base(authUtil) { _app = app.SetLoginInfo(_loginInfo); }
public void Update(ContainerApp container, ControllerScreen controller) { UpdateInternal(); }
/// <summary> /// Create or update a Container App. /// </summary> /// <remarks> /// Description for Create or update a Container App. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group to which the resource belongs. /// </param> /// <param name='name'> /// Name of the Container App. /// </param> /// <param name='containerAppEnvelope'> /// </param> public static ContainerApp BeginCreateOrUpdate(this IContainerAppsOperations operations, string resourceGroupName, string name, ContainerApp containerAppEnvelope) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, name, containerAppEnvelope).GetAwaiter().GetResult()); }
/// <summary> /// Create or update a Container App. /// </summary> /// <remarks> /// Description for Create or update a Container App. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group to which the resource belongs. /// </param> /// <param name='name'> /// Name of the Container App. /// </param> /// <param name='containerAppEnvelope'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ContainerApp> BeginCreateOrUpdateAsync(this IContainerAppsOperations operations, string resourceGroupName, string name, ContainerApp containerAppEnvelope, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, containerAppEnvelope, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Update properties of a Container App /// </summary> /// <remarks> /// Patches a Container App using JSON Merge Patch /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='name'> /// Name of the Container App. /// </param> /// <param name='containerAppEnvelope'> /// Properties of a Container App that need to be updated /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginUpdateAsync(this IContainerAppsOperations operations, string resourceGroupName, string name, ContainerApp containerAppEnvelope, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, name, containerAppEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Update properties of a Container App /// </summary> /// <remarks> /// Patches a Container App using JSON Merge Patch /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='name'> /// Name of the Container App. /// </param> /// <param name='containerAppEnvelope'> /// Properties of a Container App that need to be updated /// </param> public static void BeginUpdate(this IContainerAppsOperations operations, string resourceGroupName, string name, ContainerApp containerAppEnvelope) { operations.BeginUpdateAsync(resourceGroupName, name, containerAppEnvelope).GetAwaiter().GetResult(); }
public static bool IsRolling(this ContainerApp source) { return(source.PhysicsState.Sum(_ => _.Speed) > 0f); }
public static bool IsSpinDenied(this ContainerApp source) { return(source.Coins < source.Bet || source.SpinsAvailable <= 0); }
public MyStack() { var resourceGroup = new ResourceGroup("rg"); var workspace = new Workspace("loganalytics", new WorkspaceArgs { ResourceGroupName = resourceGroup.Name, Sku = new WorkspaceSkuArgs { Name = "PerGB2018" }, RetentionInDays = 30, }); var workspaceSharedKeys = Output.Tuple(resourceGroup.Name, workspace.Name).Apply(items => GetSharedKeys.InvokeAsync(new GetSharedKeysArgs { ResourceGroupName = items.Item1, WorkspaceName = items.Item2, })); var kubeEnv = new KubeEnvironment("env", new KubeEnvironmentArgs { ResourceGroupName = resourceGroup.Name, Type = "Managed", AppLogsConfiguration = new AppLogsConfigurationArgs { Destination = "log-analytics", LogAnalyticsConfiguration = new LogAnalyticsConfigurationArgs { CustomerId = workspace.CustomerId, SharedKey = workspaceSharedKeys.Apply(r => r.PrimarySharedKey) } } }); var registry = new Registry("registry", new RegistryArgs { ResourceGroupName = resourceGroup.Name, Sku = new SkuArgs { Name = "Basic" }, AdminUserEnabled = true }); var credentials = Output.Tuple(resourceGroup.Name, registry.Name).Apply(items => ListRegistryCredentials.InvokeAsync(new ListRegistryCredentialsArgs { ResourceGroupName = items.Item1, RegistryName = items.Item2 })); var adminUsername = credentials.Apply(credentials => credentials.Username); var adminPassword = credentials.Apply(credentials => credentials.Passwords[0].Value); var customImage = "node-app"; var myImage = new Image(customImage, new ImageArgs { ImageName = Output.Format($"{registry.LoginServer}/{customImage}:v1.0.0"), Build = new DockerBuild { Context = $"./{customImage}" }, Registry = new ImageRegistry { Server = registry.LoginServer, Username = adminUsername, Password = adminPassword } }); var containerApp = new ContainerApp("app", new ContainerAppArgs { ResourceGroupName = resourceGroup.Name, KubeEnvironmentId = kubeEnv.Id, Configuration = new ConfigurationArgs { Ingress = new IngressArgs { External = true, TargetPort = 80 }, Registries = { new RegistryCredentialsArgs { Server = registry.LoginServer, Username = adminUsername, PasswordSecretRef = "pwd", } }, Secrets = { new SecretArgs { Name = "pwd", Value = adminPassword } }, }, Template = new TemplateArgs { Containers = { new ContainerArgs { Name = "myapp", Image = myImage.ImageName, } } } }); this.Url = Output.Format($"https://{containerApp.Configuration.Apply(c => c.Ingress).Apply(i => i.Fqdn)}"); }