public StickerData(Axis axis, Vector3 position, StickerColor color) { this.color = color; cubeSide = GetCubeSide(axis, AxisExtensions.GetValueAtAxis(axis, position)); Vector2 vector2 = AxisExtensions.GetValuesExceptAxis(axis, position); this.x = vector2.x; this.y = vector2.y; }
public async Task EditStickerColor(int stickerID, StickerColor color) { var sticker = dbContext.Stickers.Find(stickerID); if (sticker != null) { sticker.Color = color; dbContext.Update(sticker); await dbContext.SaveChangesAsync(); _ = Clients.All.SendAsync("setStickerColor", sticker.StickerId, sticker.Color); } }