├── Cargo.lock ├── Cargo.toml ├── README.md ├── app ├── .eslintrc.json ├── .gitignore ├── README.md ├── components │ ├── ChopTreeButton.tsx │ ├── DisplayGameState.tsx │ ├── DisplayNfts.tsx │ ├── InitPlayerButton.tsx │ ├── RequestAirdrop.tsx │ ├── SessionKeyButton.tsx │ └── WalletMultiButton.tsx ├── contexts │ ├── GameStateProvider.tsx │ ├── NftProvider.tsx │ ├── SessionProvider.tsx │ └── WalletContextProvider.tsx ├── idl │ ├── lumberjack.json │ └── lumberjack.ts ├── next.config.js ├── package.json ├── pages │ ├── _app.tsx │ ├── _document.tsx │ ├── api │ │ └── hello.ts │ └── index.tsx ├── public │ ├── Beaver.png │ ├── Tree.png │ ├── Wood.png │ ├── energy.png │ ├── favicon.ico │ ├── next.svg │ └── vercel.svg ├── styles │ ├── Home.module.css │ └── globals.css ├── tsconfig.json ├── utils │ ├── anchor.ts │ └── wrappedConnection.ts └── yarn.lock ├── metadata.json ├── program ├── .gitignore ├── .prettierignore ├── Anchor.toml ├── Cargo.lock ├── Cargo.toml ├── README.md ├── jest.config.js ├── jesttests │ └── energy-refill-time.test.ts ├── migrations │ └── deploy.ts ├── package.json ├── programs │ └── lumberjack │ │ ├── Cargo.toml │ │ ├── Xargo.toml │ │ └── src │ │ ├── constants.rs │ │ ├── errors.rs │ │ ├── instructions │ │ ├── chop_tree.rs │ │ ├── init_player.rs │ │ └── mod.rs │ │ ├── lib.rs │ │ └── state │ │ ├── game_data.rs │ │ ├── mod.rs │ │ └── player_data.rs ├── rustfmt.toml ├── tests │ └── lumberjack.ts ├── tsconfig.json └── yarn.lock └── unity └── Lumberjack ├── .gitattributes ├── .gitignore ├── Assets ├── DOTween 4.meta ├── DOTween 4 │ ├── DOTween.XML │ ├── DOTween.XML.meta │ ├── DOTween.dll │ ├── DOTween.dll.mdb │ ├── DOTween.dll.mdb.meta │ ├── DOTween.dll.meta │ ├── Editor.meta │ ├── Editor │ │ ├── DOTweenEditor.XML │ │ ├── DOTweenEditor.XML.meta │ │ ├── DOTweenEditor.dll │ │ ├── DOTweenEditor.dll.mdb │ │ ├── DOTweenEditor.dll.mdb.meta │ │ ├── DOTweenEditor.dll.meta │ │ ├── Imgs.meta │ │ └── Imgs │ │ │ ├── DOTweenIcon.png │ │ │ ├── DOTweenIcon.png.meta │ │ │ ├── DOTweenMiniIcon.png │ │ │ ├── DOTweenMiniIcon.png.meta │ │ │ ├── Footer.png │ │ │ ├── Footer.png.meta │ │ │ ├── Footer_dark.png │ │ │ ├── Footer_dark.png.meta │ │ │ ├── Header.jpg │ │ │ └── Header.jpg.meta │ ├── Modules.meta │ ├── Modules │ │ ├── DOTweenModuleAudio.cs │ │ ├── DOTweenModuleAudio.cs.meta │ │ ├── DOTweenModuleEPOOutline.cs │ │ ├── DOTweenModuleEPOOutline.cs.meta │ │ ├── DOTweenModulePhysics.cs │ │ ├── DOTweenModulePhysics.cs.meta │ │ ├── DOTweenModulePhysics2D.cs │ │ ├── DOTweenModulePhysics2D.cs.meta │ │ ├── DOTweenModuleSprite.cs │ │ ├── DOTweenModuleSprite.cs.meta │ │ ├── DOTweenModuleUI.cs │ │ ├── DOTweenModuleUI.cs.meta │ │ ├── DOTweenModuleUnityVersion.cs │ │ ├── DOTweenModuleUnityVersion.cs.meta │ │ ├── DOTweenModuleUtils.cs │ │ └── DOTweenModuleUtils.cs.meta │ ├── readme.txt │ └── readme.txt.meta ├── Frictionless.meta ├── Frictionless │ ├── IMultiSceneSingleton.cs │ ├── IMultiSceneSingleton.cs.meta │ ├── IReinitializingMultiSceneSingleton.cs │ ├── IReinitializingMultiSceneSingleton.cs.meta │ ├── MessageRouter.cs │ ├── MessageRouter.cs.meta │ ├── ServiceFactory.cs │ └── ServiceFactory.cs.meta ├── Game.meta ├── Game │ ├── Materials.meta │ ├── Materials │ │ ├── WoodParticles.mat │ │ └── WoodParticles.mat.meta │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── DefaultButton.prefab │ │ ├── DefaultButton.prefab.meta │ │ ├── InteractionBlocker.prefab │ │ ├── InteractionBlocker.prefab.meta │ │ ├── NftItemView.prefab │ │ ├── NftItemView.prefab.meta │ │ ├── NftListPopup.prefab │ │ ├── NftListPopup.prefab.meta │ │ ├── SessionPopup.prefab │ │ ├── SessionPopup.prefab.meta │ │ ├── SolBalanceWidget.prefab │ │ ├── SolBalanceWidget.prefab.meta │ │ ├── TokenBalanceWidget.prefab │ │ ├── TokenBalanceWidget.prefab.meta │ │ ├── WoodParticles.prefab │ │ └── WoodParticles.prefab.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── GameScene.unity │ │ ├── GameScene.unity.meta │ │ ├── LoginScene.unity │ │ └── LoginScene.unity.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── SimpleRotate.cs │ │ ├── SimpleRotate.cs.meta │ │ ├── Solana.meta │ │ ├── Solana │ │ │ ├── AnchorService.cs │ │ │ ├── AnchorService.cs.meta │ │ │ ├── Lumberjack.cs │ │ │ ├── Lumberjack.cs.meta │ │ │ ├── NftMintingService.cs │ │ │ ├── NftMintingService.cs.meta │ │ │ ├── NftService.cs │ │ │ ├── NftService.cs.meta │ │ │ ├── SolanaUtils.cs │ │ │ └── SolanaUtils.cs.meta │ │ ├── Ui.meta │ │ └── Ui │ │ │ ├── BasePopup.cs │ │ │ ├── BasePopup.cs.meta │ │ │ ├── GameScreen.cs │ │ │ ├── GameScreen.cs.meta │ │ │ ├── InteractionBlocker.cs │ │ │ ├── InteractionBlocker.cs.meta │ │ │ ├── LoginScreen.cs │ │ │ ├── LoginScreen.cs.meta │ │ │ ├── NftContextMenu.cs │ │ │ ├── NftContextMenu.cs.meta │ │ │ ├── NftItemListView.cs │ │ │ ├── NftItemListView.cs.meta │ │ │ ├── NftItemView.cs │ │ │ ├── NftItemView.cs.meta │ │ │ ├── NftListPopup.cs │ │ │ ├── NftListPopup.cs.meta │ │ │ ├── NftListPopupUiData.cs │ │ │ ├── NftListPopupUiData.cs.meta │ │ │ ├── SafeArea.cs │ │ │ ├── SafeArea.cs.meta │ │ │ ├── SelectedNft.cs │ │ │ ├── SelectedNft.cs.meta │ │ │ ├── SessionPopup.cs │ │ │ ├── SessionPopup.cs.meta │ │ │ ├── SessionPopupUiData.cs │ │ │ ├── SessionPopupUiData.cs.meta │ │ │ ├── SolBalanceWidget.cs │ │ │ ├── SolBalanceWidget.cs.meta │ │ │ ├── TokenPanel.cs │ │ │ ├── TokenPanel.cs.meta │ │ │ ├── UiService.cs │ │ │ └── UiService.cs.meta │ ├── Sprites.meta │ └── Sprites │ │ ├── background.png │ │ ├── background.png.meta │ │ ├── beaver.png │ │ ├── beaver.png.meta │ │ ├── icon_energy.png │ │ ├── icon_energy.png.meta │ │ ├── icon_solana.png │ │ ├── icon_solana.png.meta │ │ ├── icon_usdc.png │ │ ├── icon_usdc.png.meta │ │ ├── icon_wood.png │ │ ├── icon_wood.png.meta │ │ ├── tree.png │ │ ├── tree.png.meta │ │ ├── ui_close_button.png │ │ ├── ui_close_button.png.meta │ │ ├── ui_default_button.png │ │ ├── ui_default_button.png.meta │ │ ├── ui_element_panel_rect.png │ │ ├── ui_element_panel_rect.png.meta │ │ ├── ui_panel.png │ │ ├── ui_panel.png.meta │ │ ├── ui_spinner.png │ │ └── ui_spinner.png.meta ├── Resources.meta ├── Resources │ ├── DOTweenSettings.asset │ ├── DOTweenSettings.asset.meta │ ├── SolanaUnitySDK.meta │ └── SolanaUnitySDK │ │ ├── WalletAdapterButton.prefab │ │ ├── WalletAdapterButton.prefab.meta │ │ ├── WalletAdapterUI.prefab │ │ ├── WalletAdapterUI.prefab.meta │ │ ├── [WalletController].prefab │ │ └── [WalletController].prefab.meta ├── Socket.meta ├── Socket │ ├── SocketStatusWidget.cs │ └── SocketStatusWidget.cs.meta ├── TextMesh Pro.meta ├── TextMesh Pro │ ├── Documentation.meta │ ├── Documentation │ │ ├── TextMesh Pro User Guide 2016.pdf │ │ └── TextMesh Pro User Guide 2016.pdf.meta │ ├── Fonts.meta │ ├── Fonts │ │ ├── LiberationSans - OFL.txt │ │ ├── LiberationSans - OFL.txt.meta │ │ ├── LiberationSans.ttf │ │ └── LiberationSans.ttf.meta │ ├── Resources.meta │ ├── Resources │ │ ├── Fonts & Materials.meta │ │ ├── Fonts & Materials │ │ │ ├── LiberationSans SDF - Drop Shadow.mat │ │ │ ├── LiberationSans SDF - Drop Shadow.mat.meta │ │ │ ├── LiberationSans SDF - Fallback.asset │ │ │ ├── LiberationSans SDF - Fallback.asset.meta │ │ │ ├── LiberationSans SDF - Outline.mat │ │ │ ├── LiberationSans SDF - Outline.mat.meta │ │ │ ├── LiberationSans SDF.asset │ │ │ └── LiberationSans SDF.asset.meta │ │ ├── LineBreaking Following Characters.txt │ │ ├── LineBreaking Following Characters.txt.meta │ │ ├── LineBreaking Leading Characters.txt │ │ ├── LineBreaking Leading Characters.txt.meta │ │ ├── Sprite Assets.meta │ │ ├── Sprite Assets │ │ │ ├── EmojiOne.asset │ │ │ └── EmojiOne.asset.meta │ │ ├── Style Sheets.meta │ │ ├── Style Sheets │ │ │ ├── Default Style Sheet.asset │ │ │ └── Default Style Sheet.asset.meta │ │ ├── TMP Settings.asset │ │ └── TMP Settings.asset.meta │ ├── Shaders.meta │ ├── Shaders │ │ ├── TMP_Bitmap-Custom-Atlas.shader │ │ ├── TMP_Bitmap-Custom-Atlas.shader.meta │ │ ├── TMP_Bitmap-Mobile.shader │ │ ├── TMP_Bitmap-Mobile.shader.meta │ │ ├── TMP_Bitmap.shader │ │ ├── TMP_Bitmap.shader.meta │ │ ├── TMP_SDF Overlay.shader │ │ ├── TMP_SDF Overlay.shader.meta │ │ ├── TMP_SDF SSD.shader │ │ ├── TMP_SDF SSD.shader.meta │ │ ├── TMP_SDF-Mobile Masking.shader │ │ ├── TMP_SDF-Mobile Masking.shader.meta │ │ ├── TMP_SDF-Mobile Overlay.shader │ │ ├── TMP_SDF-Mobile Overlay.shader.meta │ │ ├── TMP_SDF-Mobile SSD.shader │ │ ├── TMP_SDF-Mobile SSD.shader.meta │ │ ├── TMP_SDF-Mobile.shader │ │ ├── TMP_SDF-Mobile.shader.meta │ │ ├── TMP_SDF-Surface-Mobile.shader │ │ ├── TMP_SDF-Surface-Mobile.shader.meta │ │ ├── TMP_SDF-Surface.shader │ │ ├── TMP_SDF-Surface.shader.meta │ │ ├── TMP_SDF.shader │ │ ├── TMP_SDF.shader.meta │ │ ├── TMP_Sprite.shader │ │ ├── TMP_Sprite.shader.meta │ │ ├── TMPro.cginc │ │ ├── TMPro.cginc.meta │ │ ├── TMPro_Mobile.cginc │ │ ├── TMPro_Mobile.cginc.meta │ │ ├── TMPro_Properties.cginc │ │ ├── TMPro_Properties.cginc.meta │ │ ├── TMPro_Surface.cginc │ │ └── TMPro_Surface.cginc.meta │ ├── Sprites.meta │ └── Sprites │ │ ├── EmojiOne Attribution.txt │ │ ├── EmojiOne Attribution.txt.meta │ │ ├── EmojiOne.json │ │ ├── EmojiOne.json.meta │ │ ├── EmojiOne.png │ │ └── EmojiOne.png.meta ├── WebGLTemplates.meta └── WebGLTemplates │ ├── SolanaWebGlTemplate.meta │ ├── SolanaWebGlTemplate │ ├── TemplateData.meta │ ├── TemplateData │ │ ├── favicon.ico │ │ ├── favicon.ico.meta │ │ ├── fullscreen-button.png │ │ ├── fullscreen-button.png.meta │ │ ├── progress-bar-empty-dark.png │ │ ├── progress-bar-empty-dark.png.meta │ │ ├── progress-bar-empty-light.png │ │ ├── progress-bar-empty-light.png.meta │ │ ├── progress-bar-full-dark.png │ │ ├── progress-bar-full-dark.png.meta │ │ ├── progress-bar-full-light.png │ │ ├── progress-bar-full-light.png.meta │ │ ├── style.css │ │ ├── style.css.meta │ │ ├── unity-logo-dark.png │ │ ├── unity-logo-dark.png.meta │ │ ├── unity-logo-light.png │ │ ├── unity-logo-light.png.meta │ │ ├── webgl-logo.png │ │ └── webgl-logo.png.meta │ ├── index.html │ ├── index.html.meta │ ├── thumbnail.png │ └── thumbnail.png.meta │ ├── xNFT.meta │ └── xNFT │ ├── index.html │ ├── index.html.meta │ ├── thumbnail.png │ └── thumbnail.png.meta ├── Packages ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── MemorySettings.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Packages │ └── com.unity.testtools.codecoverage │ │ └── Settings.json ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── SceneTemplateSettings.json ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset ├── XRSettings.asset └── boot.config └── UserSettings ├── EditorUserSettings.asset ├── Layouts └── default-2021.dwlt └── Search.settings /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = ["program/programs/*"] 3 | resolver = "2" 4 | [profile.release] 5 | overflow-checks = true 6 | lto = "fat" 7 | codegen-units = 1 8 | 9 | [profile.release.build-override] 10 | opt-level = 3 11 | incremental = false 12 | codegen-units = 1 13 | -------------------------------------------------------------------------------- /app/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /app/README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | # or 12 | pnpm dev 13 | ``` 14 | 15 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 16 | 17 | You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. 18 | 19 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. 20 | 21 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. 22 | 23 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 24 | 25 | ## Learn More 26 | 27 | To learn more about Next.js, take a look at the following resources: 28 | 29 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 30 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 31 | 32 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 33 | 34 | ## Deploy on Vercel 35 | 36 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 37 | 38 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 39 | -------------------------------------------------------------------------------- /app/components/ChopTreeButton.tsx: -------------------------------------------------------------------------------- 1 | import Image from "next/image"; 2 | import { useCallback, useState } from "react"; 3 | import { Button, HStack, VStack } from "@chakra-ui/react"; 4 | import { useConnection, useWallet } from "@solana/wallet-adapter-react"; 5 | import { useSessionWallet } from "@magicblock-labs/gum-react-sdk"; 6 | import { useGameState } from "@/contexts/GameStateProvider"; 7 | import { 8 | GAME_DATA_SEED, 9 | gameDataPDA, 10 | getProgram, 11 | useAnchorProvider, 12 | } from "@/utils/anchor"; 13 | import { SystemProgram } from "@solana/web3.js"; 14 | 15 | const ChopTreeButton = () => { 16 | const { publicKey, sendTransaction } = useWallet(); 17 | const { connection } = useConnection(); 18 | const sessionWallet = useSessionWallet(); 19 | const { gameState, playerDataPDA } = useGameState(); 20 | const [isLoadingSession, setIsLoadingSession] = useState(false); 21 | const [isLoadingMainWallet, setIsLoadingMainWallet] = useState(false); 22 | const [transactionCounter, setTransactionCounter] = useState(0); 23 | 24 | const provider = useAnchorProvider(); 25 | var program = getProgram(provider); 26 | 27 | const onChopClick = useCallback(async () => { 28 | setIsLoadingSession(true); 29 | if (!playerDataPDA || !sessionWallet) return; 30 | setTransactionCounter(transactionCounter + 1); 31 | 32 | try { 33 | const transaction = await program.methods 34 | .chopTree(GAME_DATA_SEED, transactionCounter) 35 | .accountsPartial({ 36 | player: playerDataPDA, 37 | gameData: gameDataPDA, 38 | signer: sessionWallet.publicKey!, 39 | sessionToken: sessionWallet.sessionToken, 40 | }) 41 | .transaction(); 42 | 43 | const txids = await sessionWallet.signAndSendTransaction!(transaction); 44 | 45 | if (txids && txids.length > 0) { 46 | console.log("Transaction sent:", txids); 47 | } else { 48 | console.error("Failed to send transaction"); 49 | } 50 | } catch (error: any) { 51 | console.log("error", `Chopping failed! ${error?.message}`); 52 | } finally { 53 | setIsLoadingSession(false); 54 | } 55 | }, [sessionWallet]); 56 | 57 | const onChopMainWalletClick = useCallback(async () => { 58 | if (!publicKey || !playerDataPDA) return; 59 | 60 | setIsLoadingMainWallet(true); 61 | 62 | try { 63 | const transaction = await program.methods 64 | .chopTree(GAME_DATA_SEED, transactionCounter) 65 | .accountsPartial({ 66 | player: playerDataPDA, 67 | gameData: gameDataPDA, 68 | signer: publicKey, 69 | sessionToken: null, 70 | }) 71 | .transaction(); 72 | 73 | const txSig = await sendTransaction(transaction, connection, { 74 | skipPreflight: true, 75 | }); 76 | console.log(`https://explorer.solana.com/tx/${txSig}?cluster=devnet`); 77 | } catch (error: any) { 78 | console.log("error", `Chopping failed! ${error?.message}`); 79 | } finally { 80 | setIsLoadingMainWallet(false); 81 | } 82 | }, [publicKey, playerDataPDA, connection]); 83 | 84 | return ( 85 | <> 86 | {publicKey && gameState && ( 87 | 88 | Energy Icon 89 | 90 | {sessionWallet && sessionWallet.sessionToken != null && ( 91 | 98 | )} 99 | 106 | 107 | 108 | )} 109 | 110 | ); 111 | }; 112 | 113 | export default ChopTreeButton; 114 | -------------------------------------------------------------------------------- /app/components/DisplayGameState.tsx: -------------------------------------------------------------------------------- 1 | import Image from "next/image" 2 | import { HStack, VStack, Text } from "@chakra-ui/react" 3 | import { useWallet } from "@solana/wallet-adapter-react" 4 | import { useGameState } from "@/contexts/GameStateProvider" 5 | import { TOTAL_WOOD_AVAILABLE } from "@/utils/anchor" 6 | 7 | const DisplayPlayerData = () => { 8 | const { publicKey } = useWallet() 9 | const { gameState, nextEnergyIn, totalWoodAvailable } = useGameState() 10 | 11 | return ( 12 | <> 13 | {gameState && publicKey && ( 14 | 15 | 16 | Wood Icon 17 | Wood: {Number(gameState.wood)} 18 | 19 | 20 | Energy Icon 21 | 22 | Energy: {Number(gameState.energy)} 23 | Next in: {nextEnergyIn} 24 | 25 | 26 | Total Wood available: {Number(TOTAL_WOOD_AVAILABLE) - Number(totalWoodAvailable)} 27 | 28 | )} 29 | 30 | ) 31 | } 32 | 33 | export default DisplayPlayerData 34 | -------------------------------------------------------------------------------- /app/components/DisplayNfts.tsx: -------------------------------------------------------------------------------- 1 | import Image from "next/image" 2 | import { useWallet } from "@solana/wallet-adapter-react" 3 | import { useNftState } from "@/contexts/NftProvider" 4 | import { useState } from "react"; 5 | 6 | export class Nft { 7 | name: string; 8 | url: string; 9 | 10 | constructor() { 11 | this.url = ""; 12 | this.name = ""; 13 | } 14 | } 15 | 16 | const DisplayNfts = () => { 17 | const { publicKey } = useWallet() 18 | const { nftState: nftState } = useNftState() 19 | const [showItems, setShowItems] = useState(false); 20 | 21 | const handleButtonClick = () => { 22 | setShowItems(!showItems); 23 | }; 24 | 25 | var myNfts = new Array(); 26 | 27 | if (nftState != null) { 28 | for (var i = 0; i < nftState.items.length; i++) { 29 | try { 30 | 31 | const nftData = nftState.items[i]; 32 | let nft = new Nft(); 33 | 34 | nft.name = nftData.content.metadata.name; 35 | nft.url = nftData.content.links.image; 36 | 37 | myNfts.push(nft); 38 | } catch (error) { 39 | console.log(error); 40 | } 41 | } 42 | } 43 | 44 | function onNftClickedCallback(nft: Nft): void { 45 | window.alert("Nft clicked: " + nft.name); 46 | } 47 | 48 | return ( 49 | <> 50 | {nftState && publicKey && ( 51 |
52 | 53 | {showItems && ( 54 |
55 | {myNfts.map((nft) => ( 56 |
57 |

{nft.name}

58 |
59 | {nft.url ? ( 60 | onNftClickedCallback(nft)} 62 | src={nft.url} 63 | alt="NFT Icon" 64 | width={64} 65 | height={64} 66 | /> 67 | ) : ( 68 |
Error loading image
69 | )} 70 | 71 |
72 |
73 | ))} 74 |
75 | )} 76 |
77 | )} 78 | 79 | ); 80 | } 81 | 82 | export default DisplayNfts 83 | -------------------------------------------------------------------------------- /app/components/InitPlayerButton.tsx: -------------------------------------------------------------------------------- 1 | import { useCallback, useState } from "react"; 2 | import { Button } from "@chakra-ui/react"; 3 | import { SystemProgram } from "@solana/web3.js"; 4 | import { useConnection, useWallet } from "@solana/wallet-adapter-react"; 5 | import { useGameState } from "@/contexts/GameStateProvider"; 6 | import { 7 | GAME_DATA_SEED, 8 | gameDataPDA, 9 | getProgram, 10 | useAnchorProvider, 11 | } from "@/utils/anchor"; 12 | 13 | const InitPlayerButton = () => { 14 | const { publicKey, sendTransaction, wallet } = useWallet(); 15 | const { connection } = useConnection(); 16 | const [isLoading, setIsLoading] = useState(false); 17 | const { gameState, playerDataPDA } = useGameState(); 18 | 19 | const provider = useAnchorProvider(); 20 | var program = getProgram(provider); 21 | 22 | // Init player button click handler 23 | const handleClick = useCallback(async () => { 24 | if (!publicKey || !playerDataPDA) return; 25 | 26 | setIsLoading(true); 27 | 28 | try { 29 | const transaction = await program.methods 30 | .initPlayer(GAME_DATA_SEED) 31 | .accountsStrict({ 32 | player: playerDataPDA, 33 | gameData: gameDataPDA, 34 | signer: publicKey, 35 | systemProgram: SystemProgram.programId, 36 | }) 37 | .transaction(); 38 | 39 | const txSig = await sendTransaction(transaction, connection, { 40 | skipPreflight: true, 41 | }); 42 | 43 | console.log(`https://explorer.solana.com/tx/${txSig}?cluster=devnet`); 44 | } catch (error) { 45 | console.log(error); 46 | } finally { 47 | setIsLoading(false); // set loading state back to false 48 | } 49 | }, [publicKey, playerDataPDA, connection]); 50 | 51 | return ( 52 | <> 53 | {!gameState && publicKey && ( 54 | 57 | )} 58 | 59 | ); 60 | }; 61 | 62 | export default InitPlayerButton; 63 | -------------------------------------------------------------------------------- /app/components/RequestAirdrop.tsx: -------------------------------------------------------------------------------- 1 | import { useCallback, useEffect, useState } from "react" 2 | import { Button, Text } from "@chakra-ui/react" 3 | import { LAMPORTS_PER_SOL } from "@solana/web3.js" 4 | import { useConnection, useWallet } from "@solana/wallet-adapter-react" 5 | 6 | const RequestAirdrop = () => { 7 | const { publicKey } = useWallet() 8 | const { connection } = useConnection() 9 | const [balance, setBalance] = useState(0) 10 | const [isLoading, setIsLoading] = useState(false) 11 | 12 | const getBalance = useCallback(async () => { 13 | if (!publicKey) return 14 | const balance = await connection.getBalance(publicKey, "confirmed") 15 | setBalance(balance / LAMPORTS_PER_SOL) 16 | }, [publicKey, connection]) 17 | 18 | const onClick = useCallback(async () => { 19 | setIsLoading(true) 20 | if (!publicKey) return 21 | try { 22 | const txSig = await connection.requestAirdrop(publicKey, LAMPORTS_PER_SOL) 23 | await connection.confirmTransaction(txSig) 24 | getBalance() 25 | } catch (error: any) { 26 | alert(error.message) 27 | } finally { 28 | setIsLoading(false) 29 | } 30 | }, [publicKey, connection, getBalance]) 31 | 32 | useEffect(() => { 33 | getBalance() 34 | }, [getBalance]) 35 | 36 | return ( 37 | <> 38 | {publicKey && 39 | (balance <= 0 ? ( 40 | 43 | ) : ( 44 | Balance: {Number(balance).toFixed(3)} 45 | ))} 46 | 47 | ) 48 | } 49 | 50 | export default RequestAirdrop 51 | -------------------------------------------------------------------------------- /app/components/SessionKeyButton.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import { Button } from "@chakra-ui/react"; 3 | import { useWallet } from "@solana/wallet-adapter-react"; 4 | import { useSessionWallet } from "@magicblock-labs/gum-react-sdk"; 5 | import { useGameState } from "@/contexts/GameStateProvider"; 6 | import { PROGRAM_ID } from "@/utils/anchor"; 7 | 8 | const SessionKeyButton = () => { 9 | const { publicKey } = useWallet(); 10 | const { gameState } = useGameState(); 11 | const sessionWallet = useSessionWallet(); 12 | const [isLoading, setIsLoading] = useState(false); 13 | 14 | const handleCreateSession = async () => { 15 | setIsLoading(true); 16 | const topUp = true; 17 | const expiryInMinutes = 600; 18 | 19 | try { 20 | const session = await sessionWallet.createSession( 21 | PROGRAM_ID, 22 | topUp, 23 | expiryInMinutes 24 | ); 25 | console.log("Session created:", session); 26 | } catch (error) { 27 | console.error("Failed to create session:", error); 28 | } finally { 29 | setIsLoading(false); 30 | } 31 | }; 32 | 33 | const handleRevokeSession = async () => { 34 | setIsLoading(true); 35 | try { 36 | await sessionWallet.revokeSession(); 37 | console.log("Session revoked"); 38 | } catch (error) { 39 | console.error("Failed to revoke session:", error); 40 | } finally { 41 | setIsLoading(false); 42 | } 43 | }; 44 | 45 | return ( 46 | <> 47 | {publicKey && gameState && ( 48 | 60 | )} 61 | 62 | ); 63 | }; 64 | 65 | export default SessionKeyButton; 66 | -------------------------------------------------------------------------------- /app/components/WalletMultiButton.tsx: -------------------------------------------------------------------------------- 1 | import dynamic from "next/dynamic" 2 | 3 | export const WalletMultiButtonDynamic = dynamic( 4 | async () => 5 | (await import("@solana/wallet-adapter-react-ui")).WalletMultiButton, 6 | { ssr: false } 7 | ) 8 | 9 | const WalletMultiButton = () => { 10 | return 11 | } 12 | 13 | export default WalletMultiButton 14 | -------------------------------------------------------------------------------- /app/contexts/NftProvider.tsx: -------------------------------------------------------------------------------- 1 | import { createContext, useContext, useEffect, useState } from "react" 2 | import { PublicKey } from "@solana/web3.js" 3 | import { useWallet } from "@solana/wallet-adapter-react" 4 | import { 5 | CONNECTION, 6 | } from "@/utils/anchor" 7 | 8 | const NftContext = createContext<{ 9 | nftState: any | null 10 | }>({ 11 | nftState: null, 12 | }) 13 | 14 | export const useNftState = () => useContext(NftContext) 15 | 16 | export const NftProvider = ({ 17 | children, 18 | }: { 19 | children: React.ReactNode 20 | }) => { 21 | const { publicKey } = useWallet() 22 | 23 | const [nftState, setNftState] = useState(null) 24 | 25 | useEffect( () => { 26 | setNftState(null) 27 | if (!publicKey) { 28 | return 29 | } 30 | 31 | getAssetsByOwner(publicKey); 32 | 33 | }, [publicKey]); 34 | 35 | async function getAssetsByOwner(ownerAddress: PublicKey) { 36 | const sortBy = { 37 | sortBy: "created", 38 | sortDirection: "asc", 39 | }; 40 | const limit = 1000; 41 | const page = 1; 42 | const before = ""; 43 | const after = ""; 44 | const allAssetsOwned = await CONNECTION.getAssetsByOwner( 45 | ownerAddress.toBase58(), 46 | sortBy, 47 | limit, 48 | page, 49 | before, 50 | after 51 | ); 52 | 53 | setNftState(allAssetsOwned); 54 | console.log(allAssetsOwned); 55 | } 56 | 57 | return ( 58 | 63 | {children} 64 | 65 | ) 66 | } 67 | -------------------------------------------------------------------------------- /app/contexts/SessionProvider.tsx: -------------------------------------------------------------------------------- 1 | import { SessionWalletProvider, useSessionKeyManager } from "@magicblock-labs/gum-react-sdk" 2 | 3 | import { 4 | AnchorWallet, 5 | useAnchorWallet, 6 | useConnection, 7 | } from "@solana/wallet-adapter-react" 8 | 9 | interface SessionProviderProps { 10 | children: React.ReactNode 11 | } 12 | 13 | const SessionProvider: React.FC = ({ children }) => { 14 | const { connection } = useConnection() 15 | const anchorWallet = useAnchorWallet() as AnchorWallet 16 | const cluster = "devnet" // or "mainnet-beta", "testnet", "localnet" 17 | const sessionWallet = useSessionKeyManager(anchorWallet, connection, cluster) 18 | 19 | return ( 20 | 21 | {children} 22 | 23 | ) 24 | } 25 | 26 | export default SessionProvider 27 | -------------------------------------------------------------------------------- /app/contexts/WalletContextProvider.tsx: -------------------------------------------------------------------------------- 1 | import { FC, ReactNode, useMemo } from "react"; 2 | import { WalletAdapterNetwork } from "@solana/wallet-adapter-base"; 3 | import { 4 | ConnectionProvider, 5 | WalletProvider, 6 | } from "@solana/wallet-adapter-react"; 7 | import { WalletModalProvider } from "@solana/wallet-adapter-react-ui"; 8 | import { clusterApiUrl } from "@solana/web3.js"; 9 | require("@solana/wallet-adapter-react-ui/styles.css"); 10 | 11 | const WalletContextProvider: FC<{ children: ReactNode }> = ({ children }) => { 12 | const network = WalletAdapterNetwork.Devnet; 13 | const endpoint = useMemo(() => clusterApiUrl(network), [network]); 14 | 15 | const wallets = useMemo(() => [], [network]); 16 | 17 | return ( 18 | 19 | 20 | {children} 21 | 22 | 23 | ); 24 | }; 25 | 26 | export default WalletContextProvider; 27 | -------------------------------------------------------------------------------- /app/next.config.js: -------------------------------------------------------------------------------- 1 | // Notice that currently nft images from all domains can be fetched. 2 | // This is not recommended for production use since there could be some security issues. 3 | 4 | /** @type {import('next').NextConfig} */ 5 | const nextConfig = { 6 | images: { 7 | remotePatterns: [ 8 | { 9 | protocol: "https", 10 | hostname: "**", 11 | }, 12 | ], 13 | }, 14 | }; 15 | 16 | module.exports = nextConfig 17 | -------------------------------------------------------------------------------- /app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wallet-adapter-chakraui-nextjs", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@chakra-ui/next-js": "^2.1.3", 13 | "@chakra-ui/react": "^2.6.1", 14 | "@coral-xyz/anchor": "^0.30.1", 15 | "@emotion/react": "^11.11.0", 16 | "@emotion/styled": "^11.11.0", 17 | "@magicblock-labs/gum-react-sdk": "^3.0.5", 18 | "@magicblock-labs/gum-sdk": "^3.0.5", 19 | "@solana/wallet-adapter-base": "^0.9.23", 20 | "@solana/wallet-adapter-react": "^0.15.35", 21 | "@solana/wallet-adapter-react-ui": "^0.9.35", 22 | "@solana/wallet-adapter-wallets": "^0.19.32", 23 | "@solana/web3.js": "^1.95.2", 24 | "@types/node": "22.1.0", 25 | "@types/react": "18.2.7", 26 | "@types/react-dom": "18.2.4", 27 | "eslint": "8.41.0", 28 | "eslint-config-next": "13.4.4", 29 | "framer-motion": "^10.12.16", 30 | "next": "13.4.4", 31 | "react": "18.2.0", 32 | "react-dom": "18.2.0", 33 | "typescript": "5.0.4", 34 | "browserify-sign": ">=4.2.2", 35 | "crypto-js": ">=4.2.0" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import { ChakraProvider } from "@chakra-ui/react" 2 | import WalletContextProvider from "../contexts/WalletContextProvider" 3 | import SessionProvider from "@/contexts/SessionProvider" 4 | import { GameStateProvider } from "@/contexts/GameStateProvider" 5 | import type { AppProps } from "next/app" 6 | import { NftProvider } from "@/contexts/NftProvider" 7 | 8 | export default function App({ Component, pageProps }: AppProps) { 9 | return ( 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /app/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { Html, Head, Main, NextScript } from 'next/document' 2 | 3 | export default function Document() { 4 | return ( 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /app/pages/api/hello.ts: -------------------------------------------------------------------------------- 1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction 2 | import type { NextApiRequest, NextApiResponse } from 'next' 3 | 4 | type Data = { 5 | name: string 6 | } 7 | 8 | export default function handler( 9 | req: NextApiRequest, 10 | res: NextApiResponse 11 | ) { 12 | res.status(200).json({ name: 'John Doe' }) 13 | } 14 | -------------------------------------------------------------------------------- /app/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Flex, Heading, Spacer, VStack, Text } from "@chakra-ui/react" 2 | import { useWallet } from "@solana/wallet-adapter-react" 3 | import WalletMultiButton from "@/components/WalletMultiButton" 4 | import DisplayGameState from "@/components/DisplayGameState" 5 | import InitPlayerButton from "@/components/InitPlayerButton" 6 | import SessionKeyButton from "@/components/SessionKeyButton" 7 | import ChopTreeButton from "@/components/ChopTreeButton" 8 | import RequestAirdrop from "@/components/RequestAirdrop" 9 | import DisplayNfts from "@/components/DisplayNfts" 10 | 11 | export default function Home() { 12 | const { publicKey } = useWallet() 13 | 14 | return ( 15 | 16 | 17 | 18 | 19 | 20 | 21 | So Lumberjack 22 | {!publicKey && Connect to devnet wallet!} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ) 32 | } 33 | -------------------------------------------------------------------------------- /app/public/Beaver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/app/public/Beaver.png -------------------------------------------------------------------------------- /app/public/Tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/app/public/Tree.png -------------------------------------------------------------------------------- /app/public/Wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/app/public/Wood.png -------------------------------------------------------------------------------- /app/public/energy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/app/public/energy.png -------------------------------------------------------------------------------- /app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/app/public/favicon.ico -------------------------------------------------------------------------------- /app/public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/styles/globals.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --max-width: 1100px; 3 | --border-radius: 12px; 4 | --font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 5 | 'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro', 6 | 'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace; 7 | 8 | --foreground-rgb: 0, 0, 0; 9 | --background-start-rgb: 214, 219, 220; 10 | --background-end-rgb: 255, 255, 255; 11 | 12 | --primary-glow: conic-gradient( 13 | from 180deg at 50% 50%, 14 | #16abff33 0deg, 15 | #0885ff33 55deg, 16 | #54d6ff33 120deg, 17 | #0071ff33 160deg, 18 | transparent 360deg 19 | ); 20 | --secondary-glow: radial-gradient( 21 | rgba(255, 255, 255, 1), 22 | rgba(255, 255, 255, 0) 23 | ); 24 | 25 | --tile-start-rgb: 239, 245, 249; 26 | --tile-end-rgb: 228, 232, 233; 27 | --tile-border: conic-gradient( 28 | #00000080, 29 | #00000040, 30 | #00000030, 31 | #00000020, 32 | #00000010, 33 | #00000010, 34 | #00000080 35 | ); 36 | 37 | --callout-rgb: 238, 240, 241; 38 | --callout-border-rgb: 172, 175, 176; 39 | --card-rgb: 180, 185, 188; 40 | --card-border-rgb: 131, 134, 135; 41 | } 42 | 43 | @media (prefers-color-scheme: dark) { 44 | :root { 45 | --foreground-rgb: 255, 255, 255; 46 | --background-start-rgb: 0, 0, 0; 47 | --background-end-rgb: 0, 0, 0; 48 | 49 | --primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0)); 50 | --secondary-glow: linear-gradient( 51 | to bottom right, 52 | rgba(1, 65, 255, 0), 53 | rgba(1, 65, 255, 0), 54 | rgba(1, 65, 255, 0.3) 55 | ); 56 | 57 | --tile-start-rgb: 2, 13, 46; 58 | --tile-end-rgb: 2, 5, 19; 59 | --tile-border: conic-gradient( 60 | #ffffff80, 61 | #ffffff40, 62 | #ffffff30, 63 | #ffffff20, 64 | #ffffff10, 65 | #ffffff10, 66 | #ffffff80 67 | ); 68 | 69 | --callout-rgb: 20, 20, 20; 70 | --callout-border-rgb: 108, 108, 108; 71 | --card-rgb: 100, 100, 100; 72 | --card-border-rgb: 200, 200, 200; 73 | } 74 | } 75 | 76 | * { 77 | box-sizing: border-box; 78 | padding: 0; 79 | margin: 0; 80 | } 81 | 82 | html, 83 | body { 84 | max-width: 100vw; 85 | overflow-x: hidden; 86 | } 87 | 88 | body { 89 | color: rgb(var(--foreground-rgb)); 90 | background: linear-gradient( 91 | to bottom, 92 | transparent, 93 | rgb(var(--background-end-rgb)) 94 | ) 95 | rgb(var(--background-start-rgb)); 96 | } 97 | 98 | a { 99 | color: inherit; 100 | text-decoration: none; 101 | } 102 | 103 | @media (prefers-color-scheme: dark) { 104 | html { 105 | color-scheme: dark; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true, 17 | "paths": { 18 | "@/*": ["./*"] 19 | } 20 | }, 21 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 22 | "exclude": ["node_modules"] 23 | } 24 | -------------------------------------------------------------------------------- /app/utils/anchor.ts: -------------------------------------------------------------------------------- 1 | import { Program, IdlAccounts, BN, AnchorProvider } from "@coral-xyz/anchor"; 2 | import IDL from "../idl/lumberjack.json"; 3 | import { Lumberjack } from "@/idl/lumberjack"; 4 | import { PublicKey } from "@solana/web3.js"; 5 | import { WrappedConnection } from "./wrappedConnection"; 6 | import { 7 | AnchorWallet, 8 | useConnection, 9 | useWallet, 10 | } from "@solana/wallet-adapter-react"; 11 | 12 | export const CONNECTION = new WrappedConnection( 13 | process.env.NEXT_PUBLIC_RPC 14 | ? process.env.NEXT_PUBLIC_RPC 15 | : "https://rpc.magicblock.app/devnet", 16 | { 17 | wsEndpoint: process.env.NEXT_PUBLIC_WSS_RPC 18 | ? process.env.NEXT_PUBLIC_WSS_RPC 19 | : "wss://rpc.magicblock.app/devnet", 20 | commitment: "confirmed", 21 | } 22 | ); 23 | 24 | export const METAPLEX_READAPI = 25 | "https://devnet.helius-rpc.com/?api-key=78065db3-87fb-431c-8d43-fcd190212125"; 26 | 27 | // Here you can basically use what ever seed you want. For example one per level or city or whatever. 28 | export const GAME_DATA_SEED = "level_2"; 29 | 30 | export const PROGRAM_ID = new PublicKey(IDL.address); 31 | 32 | export function getProgram(provider: AnchorProvider) { 33 | return new Program(IDL as Lumberjack, provider); 34 | } 35 | 36 | export function useAnchorProvider() { 37 | const { connection } = useConnection(); 38 | const wallet = useWallet(); 39 | 40 | return new AnchorProvider(connection, wallet as AnchorWallet, { 41 | commitment: "confirmed", 42 | }); 43 | } 44 | 45 | export const [gameDataPDA] = PublicKey.findProgramAddressSync( 46 | [Buffer.from(GAME_DATA_SEED, "utf8")], 47 | PROGRAM_ID 48 | ); 49 | 50 | // Player Data Account Type from Idl 51 | export type PlayerData = IdlAccounts["playerData"]; 52 | export type GameData = IdlAccounts["gameData"]; 53 | 54 | // Constants for the game 55 | export const TIME_TO_REFILL_ENERGY: BN = new BN(60); 56 | export const MAX_ENERGY = 100; 57 | export const ENERGY_PER_TICK: BN = new BN(1); 58 | export const TOTAL_WOOD_AVAILABLE: BN = new BN(100000); 59 | -------------------------------------------------------------------------------- /metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Solana games preset", 3 | "version": "1.0.0", 4 | "description": "An example game using sesison keys with anchor program, js web and unity client", 5 | "logo": "https://upload.wikimedia.org/wikipedia/en/b/b9/Solana_logo.png", 6 | "project_url": "https://github.com/solana-developers/solana-game-preset", 7 | "contacts": [ 8 | "https://twitter.com/solplay_jonas", 9 | "https://github.com/Woody4618", 10 | "Discord: jonashahn", 11 | "Email: jonas.hahn@solana.org" 12 | ], 13 | "source_code": "https://github.com/solana-developers/solana-game-preset", 14 | "source_release": "v1.0.0", 15 | "preferred_languages": ["Rust", "C#", "TypeScript"], 16 | "acknowledgements": "Thanks to everybody", 17 | "expiry": "2025-12-31", 18 | "notification": "There is currently a little bug in the unity client because the fees function needs to be updates. Just replace it with 5000 for now!" 19 | } 20 | -------------------------------------------------------------------------------- /program/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .anchor 3 | .DS_Store 4 | target 5 | **/*.rs.bk 6 | node_modules 7 | test-ledger 8 | coverage -------------------------------------------------------------------------------- /program/.prettierignore: -------------------------------------------------------------------------------- 1 | 2 | .anchor 3 | .DS_Store 4 | target 5 | node_modules 6 | dist 7 | build 8 | test-ledger 9 | -------------------------------------------------------------------------------- /program/Anchor.toml: -------------------------------------------------------------------------------- 1 | [features] 2 | seeds = false 3 | [programs.localnet] 4 | lumberjack = "MkabCfyUD6rBTaYHpgKBBpBo5qzWA2pK2hrGGKMurJt" 5 | 6 | [registry] 7 | url = "https://anchor.projectserum.com" 8 | 9 | [provider] 10 | cluster = "localnet" 11 | wallet = "~/.config/solana/id.json" 12 | 13 | [scripts] 14 | test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts && RUST_LOG= yarn test" 15 | -------------------------------------------------------------------------------- /program/Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = ["programs/*"] 3 | resolver = "2" 4 | [profile.release] 5 | overflow-checks = true 6 | lto = "fat" 7 | codegen-units = 1 8 | 9 | [profile.release.build-override] 10 | opt-level = 3 11 | incremental = false 12 | codegen-units = 1 -------------------------------------------------------------------------------- /program/README.md: -------------------------------------------------------------------------------- 1 | # Anchor Solana Program 2 | 3 | ```shell 4 | anchor build 5 | anchor deploy 6 | ``` 7 | 8 | Copy the **program ID** from the output logs; paste it in `Anchor.toml` & `lib.rs`. 9 | 10 | ```shell 11 | anchor build 12 | anchor deploy 13 | 14 | yarn install 15 | yarn add ts-mocha 16 | 17 | anchor run test 18 | ``` -------------------------------------------------------------------------------- /program/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: "ts-jest", 3 | testEnvironment: "node", 4 | transform: { 5 | "^.+\\.tsx?$": "ts-jest", 6 | }, 7 | moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], 8 | }; 9 | -------------------------------------------------------------------------------- /program/migrations/deploy.ts: -------------------------------------------------------------------------------- 1 | // Migrations are an early feature. Currently, they're nothing more than this 2 | // single deploy script that's invoked from the CLI, injecting a provider 3 | // configured from the workspace's Anchor.toml. 4 | 5 | const anchor = require("@project-serum/anchor"); 6 | 7 | module.exports = async function (provider) { 8 | // Configure client to use the provider. 9 | anchor.setProvider(provider); 10 | 11 | // Add your deploy script here. 12 | }; 13 | -------------------------------------------------------------------------------- /program/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", 4 | "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check", 5 | "test": "jest" 6 | }, 7 | "dependencies": { 8 | "@coral-xyz/anchor": "0.30.1", 9 | "anchor-bankrun": "^0.4.0", 10 | "solana-bankrun": "^0.3.0" 11 | }, 12 | "devDependencies": { 13 | "@jest/globals": "^29.7.0", 14 | "@types/bn.js": "^5.1.0", 15 | "@types/chai": "^4.3.0", 16 | "@types/jest": "^29.5.12", 17 | "@types/mocha": "^9.0.0", 18 | "browserify-sign": ">=4.2.2", 19 | "chai": "^4.3.4", 20 | "crypto-js": ">=4.2.0", 21 | "jest": "^29.7.0", 22 | "mocha": "^9.0.3", 23 | "prettier": "^2.6.2", 24 | "ts-jest": "^29.2.4", 25 | "ts-mocha": "^10.0.0", 26 | "typescript": "^4.9.5" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /program/programs/lumberjack/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "lumberjack" 3 | version = "0.1.0" 4 | description = "Created with Anchor" 5 | edition = "2021" 6 | 7 | [lib] 8 | crate-type = ["cdylib", "lib"] 9 | name = "lumberjack" 10 | 11 | [features] 12 | no-entrypoint = [] 13 | no-idl = [] 14 | no-log-ix-name = [] 15 | cpi = ["no-entrypoint"] 16 | default = [] 17 | idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] 18 | 19 | [dependencies] 20 | anchor-lang = { version = "0.30.1", features = ["init-if-needed"] } 21 | anchor-spl = { version = "0.30.1" } 22 | session-keys = { version = "2.0.5", features = ["no-entrypoint"] } 23 | solana-program = "2.0.4" 24 | solana-security-txt = "1.1.1" 25 | -------------------------------------------------------------------------------- /program/programs/lumberjack/Xargo.toml: -------------------------------------------------------------------------------- 1 | [target.bpfel-unknown-unknown.dependencies.std] 2 | features = [] 3 | -------------------------------------------------------------------------------- /program/programs/lumberjack/src/constants.rs: -------------------------------------------------------------------------------- 1 | pub const TIME_TO_REFILL_ENERGY: i64 = 60; 2 | pub const MAX_ENERGY: u64 = 100; 3 | pub const MAX_WOOD_PER_TREE: u64 = 100000; 4 | -------------------------------------------------------------------------------- /program/programs/lumberjack/src/errors.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::error_code; 2 | 3 | #[error_code] 4 | pub enum GameErrorCode { 5 | #[msg("Not enough energy")] 6 | NotEnoughEnergy, 7 | #[msg("Wrong Authority")] 8 | WrongAuthority, 9 | } 10 | -------------------------------------------------------------------------------- /program/programs/lumberjack/src/instructions/chop_tree.rs: -------------------------------------------------------------------------------- 1 | pub use crate::errors::GameErrorCode; 2 | pub use crate::state::game_data::GameData; 3 | use crate::state::player_data::PlayerData; 4 | use anchor_lang::prelude::*; 5 | use session_keys::{Session, SessionToken}; 6 | 7 | pub fn chop_tree(mut ctx: Context, counter: u16, amount: u64) -> Result<()> { 8 | let account: &mut &mut ChopTree<'_> = &mut ctx.accounts; 9 | account.player.update_energy()?; 10 | account.player.print()?; 11 | 12 | if account.player.energy < amount { 13 | return err!(GameErrorCode::NotEnoughEnergy); 14 | } 15 | 16 | account.player.last_id = counter; 17 | account.player.chop_tree(amount)?; 18 | account.game_data.on_tree_chopped(amount)?; 19 | 20 | msg!( 21 | "You chopped a tree and got 1 wood. You have {} wood and {} energy left.", 22 | ctx.accounts.player.wood, 23 | ctx.accounts.player.energy 24 | ); 25 | Ok(()) 26 | } 27 | 28 | #[derive(Accounts, Session)] 29 | #[instruction(level_seed: String)] 30 | pub struct ChopTree<'info> { 31 | #[session( 32 | // The ephemeral key pair signing the transaction 33 | signer = signer, 34 | // The authority of the user account which must have created the session 35 | authority = player.authority.key() 36 | )] 37 | // Session Tokens are passed as optional accounts 38 | pub session_token: Option>, 39 | 40 | // There is one PlayerData account 41 | #[account( 42 | mut, 43 | seeds = [b"player".as_ref(), player.authority.key().as_ref()], 44 | bump, 45 | )] 46 | pub player: Account<'info, PlayerData>, 47 | 48 | // There can be multiple levels the seed for the level is passed in the instruction 49 | // First player starting a new level will pay for the account in the current setup 50 | #[account( 51 | init_if_needed, 52 | payer = signer, 53 | space = 1000, 54 | seeds = [level_seed.as_ref()], 55 | bump, 56 | )] 57 | pub game_data: Account<'info, GameData>, 58 | 59 | #[account(mut)] 60 | pub signer: Signer<'info>, 61 | pub system_program: Program<'info, System>, 62 | } 63 | -------------------------------------------------------------------------------- /program/programs/lumberjack/src/instructions/init_player.rs: -------------------------------------------------------------------------------- 1 | pub use crate::errors::GameErrorCode; 2 | use crate::state::player_data::PlayerData; 3 | use crate::{constants::MAX_ENERGY, GameData}; 4 | use anchor_lang::prelude::*; 5 | 6 | pub fn init_player(ctx: Context) -> Result<()> { 7 | ctx.accounts.player.energy = MAX_ENERGY; 8 | ctx.accounts.player.last_login = Clock::get()?.unix_timestamp; 9 | ctx.accounts.player.authority = ctx.accounts.signer.key(); 10 | Ok(()) 11 | } 12 | 13 | #[derive(Accounts)] 14 | #[instruction(level_seed: String)] 15 | pub struct InitPlayer<'info> { 16 | #[account( 17 | init, 18 | payer = signer, 19 | space = 1000, // 8+32+x+1+8+8+8 But taking 1000 to have space to expand easily. 20 | seeds = [b"player".as_ref(), signer.key().as_ref()], 21 | bump, 22 | )] 23 | pub player: Account<'info, PlayerData>, 24 | 25 | #[account( 26 | init_if_needed, 27 | payer = signer, 28 | space = 1000, // 8 + 8 for anchor account discriminator and the u64. Using 1000 to have space to expand easily. 29 | seeds = [level_seed.as_ref()], 30 | bump, 31 | )] 32 | pub game_data: Account<'info, GameData>, 33 | 34 | #[account(mut)] 35 | pub signer: Signer<'info>, 36 | pub system_program: Program<'info, System>, 37 | } 38 | -------------------------------------------------------------------------------- /program/programs/lumberjack/src/instructions/mod.rs: -------------------------------------------------------------------------------- 1 | //! All instructions 2 | pub mod chop_tree; 3 | pub mod init_player; 4 | 5 | pub use chop_tree::*; 6 | pub use init_player::*; 7 | -------------------------------------------------------------------------------- /program/programs/lumberjack/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub use crate::errors::GameErrorCode; 2 | pub use anchor_lang::prelude::*; 3 | pub use session_keys::{ session_auth_or, Session, SessionError }; 4 | pub mod constants; 5 | pub mod errors; 6 | pub mod instructions; 7 | pub mod state; 8 | use instructions::*; 9 | 10 | #[cfg(not(feature = "no-entrypoint"))] 11 | use solana_security_txt::security_txt; 12 | 13 | declare_id!("MkabCfyUD6rBTaYHpgKBBpBo5qzWA2pK2hrGGKMurJt"); 14 | 15 | #[cfg(not(feature = "no-entrypoint"))] 16 | security_txt! { 17 | // Required fields 18 | name: "Solana Game Preset", 19 | project_url: "https://github.com/solana-developers/solana-game-preset", 20 | contacts: "email:Dev Rel , twitter:https://x.com/solana_devs", 21 | policy: "There bug bounties in this repository, but PRs are welcome. :)", 22 | 23 | // Optional Fields 24 | preferred_languages: "en,de", 25 | source_code: "https://github.com/solana-developers/solana-game-preset", 26 | source_revision: "5vJwnLeyjV8uNJSp1zn7VLW8GwiQbcsQbGaVSwRmkE4r", 27 | source_release: "", 28 | encryption: "", 29 | auditors: "Verifier pubkey: 5vJwnLeyjV8uNJSp1zn7VLW8GwiQbcsQbGaVSwRmkE4r", 30 | acknowledgements: "Thanks to all the contributors!" 31 | } 32 | 33 | #[program] 34 | pub mod lumberjack { 35 | use super::*; 36 | 37 | pub fn init_player(ctx: Context, _level_seed: String) -> Result<()> { 38 | init_player::init_player(ctx) 39 | } 40 | 41 | // This function lets the player chop a tree and get 1 wood. The session_auth_or macro 42 | // lets the player either use their session token or their main wallet. (The counter is only 43 | // there so that the player can do multiple transactions in the same block. Without it multiple transactions 44 | // in the same block would result in the same signature and therefore fail.) 45 | #[session_auth_or( 46 | ctx.accounts.player.authority.key() == ctx.accounts.signer.key(), 47 | GameErrorCode::WrongAuthority 48 | )] 49 | pub fn chop_tree(ctx: Context, _level_seed: String, counter: u16) -> Result<()> { 50 | chop_tree::chop_tree(ctx, counter, 1) 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /program/programs/lumberjack/src/state/game_data.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | use crate::constants::MAX_WOOD_PER_TREE; 4 | 5 | #[account] 6 | pub struct GameData { 7 | pub total_wood_collected: u64, 8 | } 9 | 10 | impl GameData { 11 | pub fn on_tree_chopped(&mut self, amount_chopped: u64) -> Result<()> { 12 | match self.total_wood_collected.checked_add(amount_chopped) { 13 | Some(v) => { 14 | if self.total_wood_collected >= MAX_WOOD_PER_TREE { 15 | self.total_wood_collected = 0; 16 | msg!("Tree successfully chopped. New Tree coming up."); 17 | } else { 18 | self.total_wood_collected = v; 19 | msg!("Total wood chopped: {}", v); 20 | } 21 | } 22 | None => { 23 | msg!("The ever tree is completly chopped!"); 24 | } 25 | }; 26 | 27 | Ok(()) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /program/programs/lumberjack/src/state/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod game_data; 2 | pub mod player_data; 3 | -------------------------------------------------------------------------------- /program/programs/lumberjack/src/state/player_data.rs: -------------------------------------------------------------------------------- 1 | use crate::constants::*; 2 | use anchor_lang::prelude::*; 3 | 4 | #[account] 5 | pub struct PlayerData { 6 | pub authority: Pubkey, 7 | pub name: String, 8 | pub level: u8, 9 | pub xp: u64, 10 | pub wood: u64, 11 | pub energy: u64, 12 | pub last_login: i64, 13 | pub last_id: u16, 14 | } 15 | 16 | impl PlayerData { 17 | pub fn print(&mut self) -> Result<()> { 18 | // Note that logging costs a lot of compute. So don't use it too much. 19 | msg!( 20 | "Authority: {} Wood: {} Energy: {}", 21 | self.authority, 22 | self.wood, 23 | self.energy 24 | ); 25 | Ok(()) 26 | } 27 | 28 | pub fn update_energy(&mut self) -> Result<()> { 29 | // Get the current timestamp 30 | let current_timestamp = Clock::get()?.unix_timestamp; 31 | 32 | // Calculate the time passed since the last login 33 | let mut time_passed: i64 = current_timestamp - self.last_login; 34 | 35 | // Calculate the time spent refilling energy 36 | let mut time_spent = 0; 37 | 38 | while time_passed >= TIME_TO_REFILL_ENERGY && self.energy < MAX_ENERGY { 39 | self.energy += 1; 40 | time_passed -= TIME_TO_REFILL_ENERGY; 41 | time_spent += TIME_TO_REFILL_ENERGY; 42 | } 43 | 44 | if self.energy >= MAX_ENERGY { 45 | self.last_login = current_timestamp; 46 | } else { 47 | self.last_login += time_spent; 48 | } 49 | 50 | Ok(()) 51 | } 52 | 53 | pub fn chop_tree(&mut self, amount: u64) -> Result<()> { 54 | match self.wood.checked_add(amount) { 55 | Some(v) => { 56 | self.wood = v; 57 | } 58 | None => { 59 | msg!("Total wood reached!"); 60 | } 61 | }; 62 | match self.energy.checked_sub(amount) { 63 | Some(v) => { 64 | self.energy = v; 65 | } 66 | None => { 67 | self.energy = 0; 68 | } 69 | }; 70 | Ok(()) 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /program/rustfmt.toml: -------------------------------------------------------------------------------- 1 | comment_width = 80 2 | edition = "2021" 3 | format_code_in_doc_comments = true 4 | format_strings = true 5 | group_imports = "One" 6 | ignore = [ 7 | "**/*/entrypoint.rs" 8 | ] 9 | imports_granularity = "One" 10 | use_field_init_shorthand = true 11 | wrap_comments = true -------------------------------------------------------------------------------- /program/tests/lumberjack.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@coral-xyz/anchor"; 2 | import { Program } from "@coral-xyz/anchor"; 3 | import { Lumberjack } from "../target/types/lumberjack"; 4 | 5 | describe("lumberjack", () => { 6 | const provider = anchor.AnchorProvider.env(); 7 | anchor.setProvider(provider); 8 | const program = anchor.workspace.Lumberjack as Program; 9 | const payer = provider.wallet as anchor.Wallet; 10 | const gameDataSeed = "gameData"; 11 | 12 | it("Init player and chop tree!", async () => { 13 | console.log("Local address", payer.publicKey.toBase58()); 14 | 15 | const balance = await anchor 16 | .getProvider() 17 | .connection.getBalance(payer.publicKey); 18 | 19 | if (balance < 1e8) { 20 | const res = await anchor 21 | .getProvider() 22 | .connection.requestAirdrop(payer.publicKey, 1e9); 23 | await anchor 24 | .getProvider() 25 | .connection.confirmTransaction(res, "confirmed"); 26 | } 27 | 28 | const [playerPDA] = anchor.web3.PublicKey.findProgramAddressSync( 29 | [Buffer.from("player"), payer.publicKey.toBuffer()], 30 | program.programId 31 | ); 32 | 33 | console.log("Player PDA", playerPDA.toBase58()); 34 | 35 | const [gameDataPDA] = anchor.web3.PublicKey.findProgramAddressSync( 36 | [Buffer.from(gameDataSeed)], 37 | program.programId 38 | ); 39 | 40 | try { 41 | let tx = await program.methods 42 | .initPlayer(gameDataSeed) 43 | .accountsStrict({ 44 | player: playerPDA, 45 | signer: payer.publicKey, 46 | gameData: gameDataPDA, 47 | systemProgram: anchor.web3.SystemProgram.programId, 48 | }) 49 | .rpc({ skipPreflight: true }); 50 | console.log("Init transaction", tx); 51 | 52 | await anchor.getProvider().connection.confirmTransaction(tx, "confirmed"); 53 | console.log("Confirmed", tx); 54 | } catch (e) { 55 | console.log("Player already exists: ", e); 56 | } 57 | 58 | for (let i = 0; i < 11; i++) { 59 | console.log(`Chop instruction ${i}`); 60 | 61 | let tx = await program.methods 62 | .chopTree(gameDataSeed, 0) 63 | .accountsStrict({ 64 | player: playerPDA, 65 | sessionToken: null, 66 | signer: payer.publicKey, 67 | gameData: gameDataPDA, 68 | systemProgram: anchor.web3.SystemProgram.programId, 69 | }) 70 | .rpc(); 71 | console.log("Chop instruction", tx); 72 | await anchor.getProvider().connection.confirmTransaction(tx, "confirmed"); 73 | } 74 | 75 | const accountInfo = await anchor 76 | .getProvider() 77 | .connection.getAccountInfo(playerPDA, "confirmed"); 78 | 79 | const decoded = program.coder.accounts.decode( 80 | "playerData", 81 | accountInfo.data 82 | ); 83 | console.log("Player account info", JSON.stringify(decoded)); 84 | }); 85 | }); 86 | -------------------------------------------------------------------------------- /program/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "types": ["node", "jest", "mocha", "chai"], 4 | "typeRoots": ["./node_modules/@types"], 5 | "lib": ["es2015"], 6 | "module": "commonjs", 7 | "target": "es6", 8 | "esModuleInterop": true, 9 | "skipLibCheck": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /unity/Lumberjack/.gitignore: -------------------------------------------------------------------------------- 1 | # =============== # 2 | # Unity generated # 3 | # =============== # 4 | Temp/ 5 | Library/ 6 | Build/ 7 | Recordings/ 8 | Logs/ 9 | MemoryCaptures/ 10 | 11 | # ===================================== # 12 | # Visual Studio / MonoDevelop generated # 13 | # ===================================== # 14 | ExportedObj/ 15 | obj/ 16 | *.svd 17 | *.userprefs 18 | /*.csproj 19 | *.pidb 20 | *.suo 21 | /*.sln 22 | *.user 23 | *.unityproj 24 | *.booproj 25 | *.pidb 26 | 27 | # ===================================== # 28 | # Rider # 29 | # ===================================== # 30 | .idea 31 | .idea/* 32 | */.idea/workspace.xml 33 | */.idea/tasks.xml 34 | 35 | # ============ # 36 | # OS generated # 37 | # ============ # 38 | .DS_Store 39 | .DS_Store? 40 | ._* 41 | .Spotlight-V100 42 | .Trashes 43 | ehthumbs.db 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d07dfe7707a9469ba355c3d70d4b00f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/DOTween.XML.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8ce8aa38adb94ee48306d5f482626ad 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/DOTween.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/DOTween 4/DOTween.dll -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/DOTween.dll.mdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/DOTween 4/DOTween.dll.mdb -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/DOTween.dll.mdb.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 762728b7259db484da790c5f410eb1df 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/DOTween.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e4ed579406784a1b9a3caf71d435429 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e7a700930cc54bd5b2469673452a303 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Editor/DOTweenEditor.XML.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb3507fbdf5994c7fb58915cb59783be 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Editor/DOTweenEditor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/DOTween 4/Editor/DOTweenEditor.dll -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Editor/DOTweenEditor.dll.mdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/DOTween 4/Editor/DOTweenEditor.dll.mdb -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Editor/DOTweenEditor.dll.mdb.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b76d2c677cc849c0a491fd3c23a1046 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Editor/DOTweenEditor.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbddd467a34fa4015803d41e8359a675 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 1 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Editor/Imgs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 526ad6f0f8ce44ed18332cc9cfe9b7bc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/DOTweenIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/DOTweenIcon.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/DOTweenMiniIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/DOTweenMiniIcon.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/Footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/Footer.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/Footer_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/Footer_dark.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/Header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/DOTween 4/Editor/Imgs/Header.jpg -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Modules.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42529fddaacb0408b94ad71511eada46 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Modules/DOTweenModuleAudio.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 290f3a1ae0f3547e08fdb644c848de46 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Modules/DOTweenModuleEPOOutline.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77a2e65e896d040078d5fee7769723b4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Modules/DOTweenModulePhysics.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2848035b7e414e3da152cff59c732ed 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Modules/DOTweenModulePhysics2D.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92e5ae089108a4200ac5b7be45373a2a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Modules/DOTweenModuleSprite.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a04c73fc4f114d4d841366631994e4d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Modules/DOTweenModuleUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f28fe18d6dd2849eb88677d3feb42b82 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Modules/DOTweenModuleUnityVersion.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4371754ea9f94253ad5e15bc2bfa3ca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/Modules/DOTweenModuleUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 807108aab29cd416f9c795b5d6b0c7d8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/readme.txt: -------------------------------------------------------------------------------- 1 | DOTween and DOTween Pro are copyright (c) 2014-2018 Daniele Giardini - Demigiant 2 | 3 | // IMPORTANT!!! ///////////////////////////////////////////// 4 | // Upgrading DOTween from versions older than 1.2.000 /////// 5 | // (or DOTween Pro older than 1.0.000) ////////////////////// 6 | ------------------------------------------------------------- 7 | If you're upgrading your project from a version of DOTween older than 1.2.000 (or DOTween Pro older than 1.0.000) please follow these instructions carefully. 8 | 1) Import the new version in the same folder as the previous one, overwriting old files. A lot of errors will appear but don't worry 9 | 2) Close and reopen Unity (and your project). This is fundamental: skipping this step will cause a bloodbath 10 | 3) Open DOTween's Utility Panel (Tools > Demigiant > DOTween Utility Panel) if it doesn't open automatically, then press "Setup DOTween...": this will run the upgrade setup 11 | 4) From the Add/Remove Modules panel that opens, activate/deactivate Modules for Unity systems and for external assets (Pro version only) 12 | 13 | // GET STARTED ////////////////////////////////////////////// 14 | 15 | - After importing a new DOTween update, select DOTween's Utility Panel from the "Tools/Demigiant" menu (if it doesn't open automatically) and press the "Setup DOTween..." button to activate/deactivate Modules. You can also access a Preferences Tab from there to choose default settings for DOTween. 16 | - In your code, add "using DG.Tweening" to each class where you want to use DOTween. 17 | - You're ready to tween. Check out the links below for full documentation and license info. 18 | 19 | 20 | // LINKS /////////////////////////////////////////////////////// 21 | 22 | DOTween website (documentation, examples, etc): http://dotween.demigiant.com 23 | DOTween license: http://dotween.demigiant.com/license.php 24 | DOTween repository (Google Code): https://code.google.com/p/dotween/ 25 | Demigiant website (documentation, examples, etc): http://www.demigiant.com 26 | 27 | // NOTES ////////////////////////////////////////////////////// 28 | 29 | - DOTween's Utility Panel can be found under "Tools > Demigiant > DOTween Utility Panel" and also contains other useful options, plus a tab to set DOTween's preferences -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/DOTween 4/readme.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18cca3409bde0414f88aba683061b318 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Frictionless.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9369e30eb0024478ead305522ef92dd9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Frictionless/IMultiSceneSingleton.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | namespace Frictionless 5 | { 6 | public interface IMultiSceneSingleton 7 | { 8 | IEnumerator HandleNewSceneLoaded(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Frictionless/IMultiSceneSingleton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d2f4c7ea75a04e92bba6af04e531e1b 3 | timeCreated: 1443497683 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Frictionless/IReinitializingMultiSceneSingleton.cs: -------------------------------------------------------------------------------- 1 | namespace Frictionless 2 | { 3 | public interface IReinitializingMultiSceneSingleton : IMultiSceneSingleton 4 | { 5 | void ReinitializeAfterSceneLoad(); 6 | } 7 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Frictionless/IReinitializingMultiSceneSingleton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43cd7455839c4ab29da9bf4b7c9a9b70 3 | timeCreated: 1666809291 -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Frictionless/MessageRouter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Frictionless 5 | { 6 | public static class MessageRouter 7 | { 8 | private static readonly Dictionary> Handlers = new Dictionary>(); 9 | private static readonly List PendingRemovals = new List(); 10 | private static bool _isRaisingMessage; 11 | 12 | public static void AddHandler(Action handler) 13 | { 14 | if (!Handlers.TryGetValue(typeof(T), out var delegates)) 15 | { 16 | delegates = new List(); 17 | Handlers[typeof(T)] = delegates; 18 | } 19 | if (delegates.Find(x => x.Delegate == (Delegate) handler) == null) 20 | delegates.Add(new MessageHandler() { Target = handler.Target, Delegate = handler }); 21 | } 22 | 23 | public static void RemoveHandler(Action handler) 24 | { 25 | if (Handlers.TryGetValue(typeof(T), out var delegates)) 26 | { 27 | MessageHandler existingHandler = delegates.Find(x => x.Delegate == (Delegate) handler); 28 | if (existingHandler != null) 29 | { 30 | if (_isRaisingMessage) 31 | PendingRemovals.Add(handler); 32 | else 33 | delegates.Remove(existingHandler); 34 | } 35 | } 36 | } 37 | 38 | public static void Reset() 39 | { 40 | Handlers.Clear(); 41 | } 42 | 43 | public static void RaiseMessage(object msg) 44 | { 45 | try 46 | { 47 | if (Handlers.TryGetValue(msg.GetType(), out var delegates)) 48 | { 49 | _isRaisingMessage = true; 50 | try 51 | { 52 | foreach (MessageHandler h in delegates) 53 | { 54 | #if NETFX_CORE 55 | h.Delegate.DynamicInvoke(msg); 56 | #else 57 | h.Delegate.Method.Invoke(h.Target, new object[] { msg }); 58 | #endif 59 | } 60 | } 61 | finally 62 | { 63 | _isRaisingMessage = false; 64 | } 65 | foreach (Delegate d in PendingRemovals) 66 | { 67 | MessageHandler existingHandler = delegates.Find(x => x.Delegate == d); 68 | if (existingHandler != null) 69 | delegates.Remove(existingHandler); 70 | } 71 | PendingRemovals.Clear(); 72 | } 73 | } 74 | catch(Exception ex) 75 | { 76 | UnityEngine.Debug.LogError("Exception while raising message " + msg + ": " + ex); 77 | } 78 | } 79 | 80 | public class MessageHandler 81 | { 82 | public object Target { get; set; } 83 | public Delegate Delegate { get; set; } 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Frictionless/MessageRouter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6250354fb5cd34a109e4178105ec99fe 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Frictionless/ServiceFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | /// 7 | /// A simple, *single-threaded*, service locator appropriate for use with Unity. 8 | /// 9 | 10 | namespace Frictionless 11 | { 12 | public static class ServiceFactory 13 | { 14 | private static readonly Dictionary singletons = new Dictionary(); 15 | private static readonly Dictionary transients = new Dictionary(); 16 | private static readonly Dictionary singletonInstances = new Dictionary(); 17 | 18 | public static bool IsEmpty 19 | { 20 | get { return singletons.Count == 0 && transients.Count == 0; } 21 | } 22 | 23 | public static void Reset() 24 | { 25 | List survivorRegisteredTypes = new List(); 26 | List survivors = new List(); 27 | foreach(KeyValuePair pair in singletonInstances) 28 | { 29 | if (pair.Value is IMultiSceneSingleton) 30 | { 31 | survivors.Add(pair.Value); 32 | survivorRegisteredTypes.Add(pair.Key); 33 | } 34 | } 35 | singletons.Clear(); 36 | transients.Clear(); 37 | singletonInstances.Clear(); 38 | 39 | for (int i = 0; i < survivors.Count; i++) 40 | { 41 | singletonInstances[survivorRegisteredTypes[i]] = survivors[i]; 42 | singletons[survivorRegisteredTypes[i]] = survivors[i].GetType(); 43 | } 44 | } 45 | 46 | public static void RegisterSingleton() 47 | { 48 | singletons[typeof(TConcrete)] = typeof(TConcrete); 49 | } 50 | 51 | public static void RegisterSingleton() 52 | { 53 | singletons[typeof(TAbstract)] = typeof(TConcrete); 54 | } 55 | 56 | public static void RegisterSingleton(TConcrete instance) 57 | { 58 | singletons[typeof(TConcrete)] = typeof(TConcrete); 59 | singletonInstances[typeof(TConcrete)] = instance; 60 | } 61 | 62 | public static void RegisterTransient() 63 | { 64 | transients[typeof(TAbstract)] = typeof(TConcrete); 65 | } 66 | 67 | public static T Resolve() where T : class 68 | { 69 | return Resolve(false); 70 | } 71 | 72 | public static T Resolve(bool onlyExisting) where T : class 73 | { 74 | T result = default(T); 75 | Type concreteType = null; 76 | if (singletons.TryGetValue(typeof(T), out concreteType)) 77 | { 78 | object r = null; 79 | if (!singletonInstances.TryGetValue(typeof(T), out r) && !onlyExisting) 80 | { 81 | #if NETFX_CORE 82 | if (concreteType.GetTypeInfo().IsSubclassOf(typeof(MonoBehaviour))) 83 | #else 84 | if (concreteType.IsSubclassOf(typeof(MonoBehaviour))) 85 | #endif 86 | { 87 | GameObject singletonGameObject = new GameObject(); 88 | r = singletonGameObject.AddComponent(concreteType); 89 | singletonGameObject.name = $"{typeof(T)} (singleton)"; 90 | } 91 | else 92 | r = Activator.CreateInstance(concreteType); 93 | singletonInstances[typeof(T)] = r; 94 | } 95 | result = (T)r; 96 | } 97 | else if (transients.TryGetValue(typeof(T), out concreteType)) 98 | { 99 | object r = Activator.CreateInstance(concreteType); 100 | result = (T)r; 101 | } 102 | return result; 103 | } 104 | 105 | public static IEnumerator HandleSceneLoad(AsyncOperation sceneLoadOperation) 106 | { 107 | yield return sceneLoadOperation; 108 | foreach(KeyValuePair pair in singletonInstances) 109 | { 110 | if (pair.Value is IReinitializingMultiSceneSingleton reinitializingMultiSceneSingleton) 111 | { 112 | reinitializingMultiSceneSingleton.ReinitializeAfterSceneLoad(); 113 | } 114 | } 115 | } 116 | } 117 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Frictionless/ServiceFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bf2a384e7c804c1a9d78a115ed85e68 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 599f1b4793f214d0f99af0f39beca48d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69553b14fc52945af9f31330f2e6af0c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Materials/WoodParticles.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: WoodParticles 11 | m_Shader: {fileID: 210, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ValidKeywords: 13 | - _ALPHABLEND_ON 14 | m_InvalidKeywords: [] 15 | m_LightmapFlags: 0 16 | m_EnableInstancingVariants: 0 17 | m_DoubleSidedGI: 0 18 | m_CustomRenderQueue: 3000 19 | stringTagMap: 20 | RenderType: Transparent 21 | disabledShaderPasses: 22 | - GRABPASS 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _BumpMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailAlbedoMap: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailMask: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailNormalMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 2800000, guid: b96f00b241a5646b281bed9ba703b7e1, type: 3} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _OcclusionMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _ParallaxMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | m_Ints: [] 63 | m_Floats: 64 | - _BlendOp: 0 65 | - _BumpScale: 1 66 | - _CameraFadingEnabled: 0 67 | - _CameraFarFadeDistance: 2 68 | - _CameraNearFadeDistance: 1 69 | - _Cull: 2 70 | - _Cutoff: 0.5 71 | - _DetailNormalMapScale: 1 72 | - _DistortionBlend: 0.5 73 | - _DistortionEnabled: 0 74 | - _DistortionStrength: 1 75 | - _DistortionStrengthScaled: 0 76 | - _DstBlend: 10 77 | - _EmissionEnabled: 0 78 | - _FlipbookMode: 0 79 | - _GlossMapScale: 1 80 | - _Glossiness: 0.5 81 | - _GlossyReflections: 1 82 | - _LightingEnabled: 1 83 | - _Metallic: 0 84 | - _Mode: 2 85 | - _OcclusionStrength: 1 86 | - _Parallax: 0.02 87 | - _SmoothnessTextureChannel: 0 88 | - _SoftParticlesEnabled: 0 89 | - _SoftParticlesFarFadeDistance: 1 90 | - _SoftParticlesNearFadeDistance: 0 91 | - _SpecularHighlights: 1 92 | - _SrcBlend: 5 93 | - _UVSec: 0 94 | - _ZWrite: 0 95 | m_Colors: 96 | - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0} 97 | - _Color: {r: 1, g: 1, b: 1, a: 1} 98 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 99 | - _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0} 100 | m_BuildTextureStacks: [] 101 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Materials/WoodParticles.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3ff4f59082c147e7a8d2bc55f345f25 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd52b736b39ad4861aa536ae40e88fce 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Prefabs/DefaultButton.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c27ebc42ed62d4f528778183ed634846 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Prefabs/InteractionBlocker.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba000cab565a44c178af503c10992f7e 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Prefabs/NftItemView.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5038eeda347fc47caa6a0b71b70ee381 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Prefabs/NftListPopup.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8a0086df8f89450eacfeeb2e744ab73 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Prefabs/SessionPopup.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23ef3ee2e766b4691a392f01d949e157 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Prefabs/SolBalanceWidget.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 932385457eb6e48999e46c08f0039d6c 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Prefabs/TokenBalanceWidget.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9983340f07aa240e7adad9f74350fcf4 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Prefabs/WoodParticles.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2e6a0e3392df424da6890df0b132ae0 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ea315d0fd7389c41b19996891e99ae3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scenes/GameScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3de581c39b3447939f31966c9c9d8fb 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scenes/LoginScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 325f7fb08642c46a6a1d7f860111bd4b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a25bb613c4806473ea27f737b0f871c6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/SimpleRotate.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Game.Scripts 4 | { 5 | public class SimpleRotate : MonoBehaviour 6 | { 7 | public enum Axis 8 | { 9 | x, 10 | y, 11 | z 12 | } 13 | 14 | public float speed = 0.1f; 15 | public Axis RotationAxis = Axis.x; 16 | 17 | void Update() 18 | { 19 | var rotationAxis = Vector3.zero; 20 | switch (RotationAxis) 21 | { 22 | case Axis.x: 23 | rotationAxis = Vector3.forward; 24 | break; 25 | case Axis.y: 26 | rotationAxis = Vector3.up; 27 | break; 28 | case Axis.z: 29 | rotationAxis = Vector3.right; 30 | break; 31 | } 32 | 33 | transform.Rotate(rotationAxis * Time.deltaTime, speed); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/SimpleRotate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00d0d495a78b84f76a46e0b54b02d6d9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Solana.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a40491382f34e8bb89c6718bd4d6e08 3 | timeCreated: 1698345178 -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Solana/AnchorService.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e361c4e484a844369b54c5fd3b90def7 3 | timeCreated: 1688224689 -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Solana/Lumberjack.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69fdfaf02ce7e4bbd9e468d88775e2c7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Solana/NftMintingService.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7200cbf09ed7438eb4005bbcf351e7f7 3 | timeCreated: 1665216069 -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Solana/NftService.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c40baead10843899efb994349f11cd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Solana/SolanaUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Game.Scripts 4 | { 5 | public class SolanaUtils 6 | { 7 | public const long SolToLamports = 1000000000; 8 | } 9 | 10 | public static class ArrayUtils 11 | { 12 | public static T[] Slice(this T[] arr, uint indexFrom, uint indexTo) { 13 | if (indexFrom > indexTo) { 14 | throw new ArgumentOutOfRangeException("indexFrom is bigger than indexTo!"); 15 | } 16 | 17 | uint length = indexTo - indexFrom; 18 | T[] result = new T[length]; 19 | Array.Copy(arr, indexFrom, result, 0, length); 20 | 21 | return result; 22 | } 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Solana/SolanaUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6fd84b061c1a48119369888e1fb5e09 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb407fc6c55ac42b09ad75277f074d7e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/BasePopup.cs: -------------------------------------------------------------------------------- 1 | using Services; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | namespace Game.Scripts.Ui 6 | { 7 | public class BasePopup : MonoBehaviour 8 | { 9 | public GameObject Root; 10 | public Button CloseButton; 11 | 12 | protected void Awake() 13 | { 14 | Root.gameObject.SetActive(false); 15 | } 16 | 17 | public virtual void Open(UiService.UiData uiData) 18 | { 19 | if (CloseButton != null) 20 | { 21 | CloseButton.onClick.RemoveAllListeners(); 22 | CloseButton.onClick.AddListener(OnCloseButtonClicked); 23 | } 24 | 25 | Root.gameObject.SetActive(true); 26 | } 27 | 28 | public virtual void Close() 29 | { 30 | Root.gameObject.SetActive(false); 31 | } 32 | 33 | protected void OnCloseButtonClicked() 34 | { 35 | Close(); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/BasePopup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b54549bd3faf4cb399338343fb9093d2 3 | timeCreated: 1664440654 -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/GameScreen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1ce5defdf314eb0b303658fa3c1f425 3 | timeCreated: 1697791834 -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/InteractionBlocker.cs: -------------------------------------------------------------------------------- 1 | using TMPro; 2 | using UnityEngine; 3 | 4 | public class InteractionBlocker : MonoBehaviour 5 | { 6 | public GameObject BlockingSpinner; 7 | public GameObject NonBlocking; 8 | public TextMeshProUGUI CurrentTransactionsInProgress; 9 | public TextMeshProUGUI LastTransactionTimeText; 10 | public TextMeshProUGUI LastError; 11 | 12 | void Update() 13 | { 14 | if (AnchorService.Instance == null) 15 | { 16 | return; 17 | } 18 | BlockingSpinner.gameObject.SetActive(AnchorService.Instance.IsAnyBlockingTransactionInProgress); 19 | NonBlocking.gameObject.SetActive(AnchorService.Instance.IsAnyNonBlockingTransactionInProgress); 20 | CurrentTransactionsInProgress.text = (AnchorService.Instance.BlockingTransactionsInProgress + 21 | AnchorService.Instance.NonBlockingTransactionsInProgress).ToString(); 22 | LastTransactionTimeText.text = $"Last took: {AnchorService.Instance.LastTransactionTimeInMs}ms"; 23 | LastError.text = AnchorService.Instance.LastError; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/InteractionBlocker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37ee3c81a97bf498fb479499e5c21f97 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/LoginScreen.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Lumberjack.Accounts; 3 | using Solana.Unity.SDK; 4 | using Solana.Unity.Wallet.Bip39; 5 | using UnityEngine; 6 | using UnityEngine.SceneManagement; 7 | using UnityEngine.UI; 8 | 9 | /// 10 | /// Handles the connection to the players wallet. 11 | /// 12 | public class LoginScreen : MonoBehaviour 13 | { 14 | public Button LoginButton; 15 | public Button LoginWalletAdapterButton; 16 | 17 | void Start() 18 | { 19 | LoginButton.onClick.AddListener(OnEditorLoginClicked); 20 | LoginWalletAdapterButton.onClick.AddListener(OnLoginWalletAdapterButtonClicked); 21 | AnchorService.OnPlayerDataChanged += OnPlayerDataChanged; 22 | AnchorService.OnInitialDataLoaded += UpdateContent; 23 | } 24 | 25 | private void OnDestroy() 26 | { 27 | AnchorService.OnPlayerDataChanged -= OnPlayerDataChanged; 28 | AnchorService.OnInitialDataLoaded -= UpdateContent; 29 | } 30 | 31 | private async void OnLoginWalletAdapterButtonClicked() 32 | { 33 | await Web3.Instance.LoginWalletAdapter(); 34 | } 35 | 36 | private void OnPlayerDataChanged(PlayerData playerData) 37 | { 38 | UpdateContent(); 39 | } 40 | 41 | private void UpdateContent() 42 | { 43 | if (Web3.Account != null) 44 | { 45 | SceneManager.LoadScene("GameScene"); 46 | } 47 | } 48 | 49 | private async void OnEditorLoginClicked() 50 | { 51 | var newMnemonic = new Mnemonic(WordList.English, WordCount.Twelve); 52 | 53 | // Dont use this one for production. Its only ment for editor login 54 | var account = await Web3.Instance.LoginInGameWallet("1234") ?? 55 | await Web3.Instance.CreateAccount(newMnemonic.ToString(), "1234"); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/LoginScreen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5c4b524c3ae4c5fb001afc6bfe2162a 3 | timeCreated: 1697791735 -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/NftContextMenu.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Frictionless; 3 | using Services; 4 | using Solana.Unity.SDK.Nft; 5 | using TMPro; 6 | using UnityEngine; 7 | using UnityEngine.UI; 8 | 9 | namespace Game.Scripts.Ui 10 | { 11 | /// 12 | /// When clicking a Nft this context menu opens and shows some information about the Nft 13 | /// 14 | public class NftContextMenu : MonoBehaviour 15 | { 16 | public GameObject Root; 17 | public Button CloseButton; 18 | public TextMeshProUGUI NftNameText; 19 | public Button SelectButton; 20 | public Button TransferButton; 21 | public Nft currentNft; 22 | private Action onNftSelected; 23 | 24 | private void Awake() 25 | { 26 | ServiceFactory.RegisterSingleton(this); 27 | Root.gameObject.SetActive(false); 28 | CloseButton.onClick.AddListener(OnCloseButtonClicked); 29 | SelectButton.onClick.AddListener(OnSelectClicked); 30 | TransferButton.onClick.AddListener(OnTransferClicked); 31 | } 32 | 33 | private void OnTransferClicked() 34 | { 35 | //ServiceFactory.Resolve().OpenPopup(UiService.ScreenType.TransferNftPopup, new TransferNftPopupUiData(currentNft)); 36 | Close(); 37 | } 38 | 39 | private void OnSelectClicked() 40 | { 41 | ServiceFactory.Resolve().SelectNft(currentNft); 42 | Debug.Log($"{currentNft.metaplexData.data.offchainData.name} selected"); 43 | onNftSelected?.Invoke(currentNft); 44 | Close(); 45 | } 46 | 47 | private void OnCloseButtonClicked() 48 | { 49 | Close(); 50 | } 51 | 52 | private void Close() 53 | { 54 | Root.gameObject.SetActive(false); 55 | } 56 | 57 | public void Open(NftItemView nftItemView, Action onNftSelected) 58 | { 59 | this.onNftSelected = onNftSelected; 60 | currentNft = nftItemView.CurrentMetaPlexNFt; 61 | Root.gameObject.SetActive(true); 62 | NftNameText.text = nftItemView.CurrentMetaPlexNFt.metaplexData.data.offchainData.name; 63 | transform.position = nftItemView.transform.position; 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/NftContextMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa2ed95613a844f5f9f1aa710c9be3ad 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/NftItemListView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Frictionless; 4 | using Game.Scripts.Ui; 5 | using Solana.Unity.SDK.Nft; 6 | using Services; 7 | using UnityEngine; 8 | 9 | // Shows a list of all nfts in the NftService 10 | public class NftItemListView : MonoBehaviour 11 | { 12 | public GameObject ItemRoot; 13 | public NftItemView itemPrefab; 14 | public string FilterSymbol; 15 | public string BlackList; 16 | 17 | private List allNftItemViews = new List(); 18 | private Action onNftSelected; 19 | 20 | public void OnEnable() 21 | { 22 | UpdateContent(); 23 | } 24 | 25 | public void Start() 26 | { 27 | MessageRouter.AddHandler(OnNFtSelectedMessage); 28 | } 29 | 30 | public void SetData(Action onNftSelected) 31 | { 32 | this.onNftSelected = onNftSelected; 33 | } 34 | 35 | private void OnNFtSelectedMessage(NftSelectedMessage message) 36 | { 37 | UpdateContent(); 38 | } 39 | 40 | public void UpdateContent() 41 | { 42 | var nftService = ServiceFactory.Resolve(); 43 | if (nftService == null) 44 | { 45 | return; 46 | } 47 | 48 | foreach (Nft nft in nftService.LoadedNfts) 49 | { 50 | AddNFt(nft); 51 | } 52 | 53 | List notExistingNfts = new List(); 54 | foreach (NftItemView nftItemView in allNftItemViews) 55 | { 56 | bool existsInWallet = false; 57 | foreach (Nft walletNft in nftService.LoadedNfts) 58 | { 59 | if (nftItemView.CurrentMetaPlexNFt.metaplexData.data.mint == walletNft.metaplexData.data.mint) 60 | { 61 | existsInWallet = true; 62 | break; 63 | } 64 | } 65 | 66 | if (!existsInWallet) 67 | { 68 | notExistingNfts.Add(nftItemView); 69 | } 70 | } 71 | 72 | for (var index = notExistingNfts.Count - 1; index >= 0; index--) 73 | { 74 | var nftView = notExistingNfts[index]; 75 | allNftItemViews.Remove(nftView); 76 | Destroy(nftView.gameObject); 77 | } 78 | } 79 | 80 | public void AddNFt(Nft metaPlexNFt) 81 | { 82 | foreach (var nft in allNftItemViews) 83 | { 84 | if (nft.CurrentMetaPlexNFt.metaplexData.data.mint == metaPlexNFt.metaplexData.data.mint) 85 | { 86 | nft.SetData(metaPlexNFt, OnItemClicked); 87 | return; 88 | } 89 | } 90 | 91 | InstantiateListNftItem(metaPlexNFt); 92 | } 93 | 94 | private void InstantiateListNftItem(Nft nft) 95 | { 96 | if (string.IsNullOrEmpty(nft.metaplexData.data.mint)) 97 | { 98 | return; 99 | } 100 | 101 | if (!string.IsNullOrEmpty(FilterSymbol) && nft.metaplexData.data.offchainData.symbol != FilterSymbol) 102 | { 103 | return; 104 | } 105 | 106 | if (!string.IsNullOrEmpty(BlackList) && nft.metaplexData.data.offchainData.symbol == BlackList) 107 | { 108 | return; 109 | } 110 | 111 | NftItemView nftItemView = Instantiate(itemPrefab, ItemRoot.transform); 112 | nftItemView.SetData(nft, OnItemClicked); 113 | allNftItemViews.Add(nftItemView); 114 | } 115 | 116 | private void OnItemClicked(NftItemView itemView) 117 | { 118 | ServiceFactory.Resolve().Open(itemView, onNftSelected); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/NftItemListView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0e266ef90f54494bbd77ded7a8f4201 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/NftItemView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Frictionless; 3 | using Services; 4 | using Solana.Unity.SDK.Nft; 5 | using TMPro; 6 | using UnityEngine; 7 | using UnityEngine.UI; 8 | 9 | namespace Game.Scripts.Ui 10 | { 11 | /// 12 | /// Show the image of a given Nft and can have a click handler 13 | /// 14 | public class NftItemView : MonoBehaviour 15 | { 16 | public Nft CurrentMetaPlexNFt; 17 | public RawImage Icon; 18 | public TextMeshProUGUI Headline; 19 | public TextMeshProUGUI Description; 20 | public Button Button; 21 | public GameObject SelectionGameObject; 22 | public GameObject IsLoadingDataRoot; 23 | public GameObject LoadingErrorRoot; 24 | 25 | private Action onButtonClickedAction; 26 | 27 | public void SetData(Nft nft, Action onButtonClicked) 28 | { 29 | if (nft == null) 30 | { 31 | return; 32 | } 33 | 34 | CurrentMetaPlexNFt = nft; 35 | Icon.gameObject.SetActive(false); 36 | LoadingErrorRoot.gameObject.SetActive(false); 37 | IsLoadingDataRoot.gameObject.SetActive(true); 38 | 39 | IsLoadingDataRoot.gameObject.SetActive(false); 40 | 41 | if (nft.metaplexData.nftImage != null) 42 | { 43 | Icon.gameObject.SetActive(true); 44 | Icon.texture = nft.metaplexData.nftImage.file; 45 | } 46 | 47 | var nftService = ServiceFactory.Resolve(); 48 | 49 | SelectionGameObject.gameObject.SetActive(nftService.IsNftSelected(nft)); 50 | 51 | if (nft.metaplexData.data.offchainData != null) 52 | { 53 | Description.text = nft.metaplexData.data.offchainData.description; 54 | Headline.text = nft.metaplexData.data.offchainData.name; 55 | } 56 | 57 | Button.onClick.AddListener(OnButtonClicked); 58 | onButtonClickedAction = onButtonClicked; 59 | } 60 | 61 | private void OnButtonClicked() 62 | { 63 | onButtonClickedAction?.Invoke(this); 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/NftItemView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c804afde22164dbf8f244573e9ac776 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/NftListPopup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bda8f1b024824e39a4b5ee376ae1b15b 3 | timeCreated: 1670795422 -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/NftListPopupUiData.cs: -------------------------------------------------------------------------------- 1 | using Solana.Unity.SDK; 2 | using Services; 3 | 4 | public class NftListPopupUiData : UiService.UiData 5 | { 6 | public bool RequestNfts; 7 | public WalletBase Wallet; 8 | 9 | public NftListPopupUiData(bool requestNfts, WalletBase wallet) 10 | { 11 | RequestNfts = requestNfts; 12 | Wallet = wallet; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/NftListPopupUiData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73f7cfe92c3e4891a7c7009b03f84c06 3 | timeCreated: 1670851110 -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/SafeArea.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db21dccead92d48f9a566e9132089246 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/SelectedNft.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Frictionless; 3 | using Game.Scripts.Ui; 4 | using Services; 5 | using UnityEngine; 6 | 7 | public class SelectedNft : MonoBehaviour 8 | { 9 | public NftItemView NftItemView; 10 | 11 | private void Awake() 12 | { 13 | NftItemView.gameObject.SetActive(false); 14 | } 15 | 16 | void Start() 17 | { 18 | MessageRouter.AddHandler(OnNftSelectedMessage); 19 | UpdateContent(); 20 | } 21 | 22 | private void OnDestroy() 23 | { 24 | MessageRouter.RemoveHandler(OnNftSelectedMessage); 25 | } 26 | 27 | private void OnNftSelectedMessage(NftSelectedMessage message) 28 | { 29 | UpdateContent(); 30 | } 31 | 32 | private void UpdateContent() 33 | { 34 | var nftService = ServiceFactory.Resolve(); 35 | if (nftService != null && nftService.SelectedNft != null) 36 | { 37 | NftItemView.gameObject.SetActive(true); 38 | NftItemView.SetData(nftService.SelectedNft, view => { Debug.Log("Selected Nft clicked."); }); 39 | } 40 | else 41 | { 42 | NftItemView.gameObject.SetActive(false); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/SelectedNft.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2741eec8497b40ad885aeebd3b801fb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/SessionPopup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Services; 3 | using Solana.Unity.SDK; 4 | using TMPro; 5 | using UnityEngine; 6 | using UnityEngine.UI; 7 | 8 | namespace Game.Scripts.Ui 9 | { 10 | /// 11 | /// Screen that loads all NFTs when opened 12 | /// 13 | public class SessionPopup : BasePopup 14 | { 15 | public Button CreateSessionButton; 16 | public Button RevokeSessionButton; 17 | 18 | public TextMeshProUGUI SessionBalanceText; 19 | public TextMeshProUGUI SessionExpiryText; 20 | 21 | public GameObject LoadingSpinner; 22 | 23 | private bool loadedNfts; 24 | 25 | void Start() 26 | { 27 | CreateSessionButton.onClick.AddListener(OnCreatSessionWalletButtonClicked); 28 | RevokeSessionButton.onClick.AddListener(OnRevokeSessionButtonClicked); 29 | } 30 | 31 | public override void Open(UiService.UiData uiData) 32 | { 33 | UpdateSessionToken(); 34 | InvokeRepeating(nameof(UpdateSessionToken), 0, 3); 35 | base.Open(uiData); 36 | } 37 | 38 | public override void Close() 39 | { 40 | CancelInvoke(); 41 | base.Close(); 42 | } 43 | 44 | private async void UpdateSessionToken() 45 | { 46 | var sessionToken = await AnchorService.Instance.RequestSessionToken(); 47 | if (sessionToken == null) 48 | { 49 | SessionExpiryText.text = "Session expired"; 50 | SessionBalanceText.text = "0 Sol"; 51 | RevokeSessionButton.interactable = false; 52 | CreateSessionButton.interactable = true; 53 | return; 54 | } 55 | Debug.Log("Session token valid until: " + (new DateTime(1970, 1, 1)).AddSeconds(sessionToken.ValidUntil) + " Now: " + DateTimeOffset.UtcNow); 56 | 57 | var isValid = sessionToken.ValidUntil > DateTimeOffset.UtcNow.ToUnixTimeSeconds(); 58 | SessionExpiryText.text = "Session valid until: " + 59 | (new DateTime(1970, 1, 1)).AddSeconds(sessionToken.ValidUntil); //+ " Now: " + DateTimeOffset.UtcNow + " is valid: " + isValid; 60 | RevokeSessionButton.interactable = isValid; 61 | CreateSessionButton.interactable = !isValid; 62 | var res = await Web3.Wallet.GetBalance(sessionToken.SessionSigner); 63 | SessionBalanceText.text = res.ToString("F3") + " Sol"; 64 | } 65 | 66 | private async void OnRevokeSessionButtonClicked() 67 | { 68 | LoadingSpinner.gameObject.SetActive(true); 69 | await AnchorService.Instance.RevokeSession(); 70 | LoadingSpinner.gameObject.SetActive(false); 71 | UpdateSessionToken(); 72 | } 73 | 74 | private async void OnCreatSessionWalletButtonClicked() 75 | { 76 | LoadingSpinner.gameObject.SetActive(true); 77 | await AnchorService.Instance.CreateNewSession(); 78 | LoadingSpinner.gameObject.SetActive(false); 79 | UpdateSessionToken(); 80 | Close(); 81 | } 82 | 83 | } 84 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/SessionPopup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3dfa67021514fd193a091840c7350ed 3 | timeCreated: 1695813950 -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/SessionPopupUiData.cs: -------------------------------------------------------------------------------- 1 | using Services; 2 | 3 | namespace Game.Scripts.Ui 4 | { 5 | public class SessionPopupUiData : UiService.UiData 6 | { 7 | public SessionPopupUiData() 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/SessionPopupUiData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ecaf561bcf347a4860e3c650cee1ff9 3 | timeCreated: 1695813981 -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/SolBalanceWidget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using codebase.utility; 4 | using Solana.Unity.SDK; 5 | using TMPro; 6 | using UnityEngine; 7 | using UnityEngine.UI; 8 | 9 | namespace Game.Scripts.Ui 10 | { 11 | /// 12 | /// Shows the sol balance of the connected wallet. Should be updated at certain points, after transactions for example. 13 | /// 14 | public class SolBalanceWidget : MonoBehaviour 15 | { 16 | public TextMeshProUGUI SolBalance; 17 | public TextMeshProUGUI SolChangeText; 18 | public TextMeshProUGUI PublicKey; 19 | public Button CopyAddressButton; 20 | 21 | private double lamportsChange; 22 | private Coroutine disableSolChangeCoroutine; 23 | private double currentLamports; 24 | 25 | private void Awake() 26 | { 27 | if (CopyAddressButton) 28 | { 29 | CopyAddressButton.onClick.AddListener(OnCopyClicked); 30 | } 31 | } 32 | 33 | private void OnCopyClicked() 34 | { 35 | Clipboard.Copy(Web3.Account.PublicKey); 36 | } 37 | 38 | private void OnEnable() 39 | { 40 | Web3.OnBalanceChange += OnSolBalanceChangedMessage; 41 | } 42 | 43 | private void OnDisable() 44 | { 45 | Web3.OnBalanceChange -= OnSolBalanceChangedMessage; 46 | } 47 | 48 | private void UpdateContent() 49 | { 50 | SolBalance.text = currentLamports.ToString("F2") + " sol"; 51 | if (PublicKey != null) 52 | { 53 | PublicKey.text = Web3.Account.PublicKey; 54 | } 55 | } 56 | 57 | private void OnSolBalanceChangedMessage(double newLamports) 58 | { 59 | double balanceChange = newLamports - currentLamports; 60 | 61 | if (balanceChange != 0 && Math.Abs(currentLamports - newLamports) > 0.00000001) 62 | { 63 | lamportsChange += balanceChange; 64 | if (balanceChange > 0) 65 | { 66 | if (disableSolChangeCoroutine != null) 67 | { 68 | StopCoroutine(disableSolChangeCoroutine); 69 | } 70 | 71 | SolChangeText.text = "+" + lamportsChange.ToString("F2") + " "; 72 | disableSolChangeCoroutine = StartCoroutine(DisableSolChangeDelayed()); 73 | } 74 | else 75 | { 76 | if (balanceChange < -0.0001) 77 | { 78 | if (disableSolChangeCoroutine != null) 79 | { 80 | StopCoroutine(disableSolChangeCoroutine); 81 | } 82 | 83 | SolChangeText.text = "" + lamportsChange.ToString("F2") + " "; 84 | disableSolChangeCoroutine = StartCoroutine(DisableSolChangeDelayed()); 85 | } 86 | } 87 | 88 | currentLamports = newLamports; 89 | UpdateContent(); 90 | } 91 | else 92 | { 93 | currentLamports = newLamports; 94 | UpdateContent(); 95 | } 96 | } 97 | 98 | private IEnumerator DisableSolChangeDelayed() 99 | { 100 | SolChangeText.gameObject.SetActive(true); 101 | yield return new WaitForSeconds(3); 102 | lamportsChange = 0; 103 | SolChangeText.gameObject.SetActive(false); 104 | disableSolChangeCoroutine = null; 105 | } 106 | } 107 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/SolBalanceWidget.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bae9859e31324a0eb501c37ee3ff3e82 3 | timeCreated: 1660074869 -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/TokenPanel.cs: -------------------------------------------------------------------------------- 1 | using Frictionless; 2 | using Solana.Unity.Programs; 3 | using Solana.Unity.Rpc.Types; 4 | using Solana.Unity.SDK; 5 | using Solana.Unity.Wallet; 6 | using TMPro; 7 | using UnityEngine; 8 | 9 | namespace Game.Scripts.Ui 10 | { 11 | /// 12 | /// Shows the amount of the token "TokenMintAddress" from the connected Wallet. 13 | /// 14 | public class TokenPanel : MonoBehaviour 15 | { 16 | public TextMeshProUGUI TokenAmount; 17 | 18 | public string 19 | TokenMintAdress = 20 | "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"; // Replace with whatever token you like. (Default USDC) 21 | 22 | private PublicKey _associatedTokenAddress; 23 | 24 | void Awake() 25 | { 26 | Web3.OnLogin += onLogin; 27 | UpdateAndSubscribeToTokenAccount(); 28 | } 29 | 30 | void OnDestroy() 31 | { 32 | Web3.OnLogin -= onLogin; 33 | } 34 | 35 | private void onLogin(Account account) 36 | { 37 | UpdateAndSubscribeToTokenAccount(); 38 | } 39 | 40 | private async void UpdateAndSubscribeToTokenAccount() 41 | { 42 | if (Web3.Instance == null || Web3.Instance.WalletBase.Account == null) 43 | { 44 | return; 45 | } 46 | 47 | var wallet = Web3.Instance.WalletBase; 48 | 49 | if (wallet != null && wallet.Account.PublicKey != null) 50 | { 51 | _associatedTokenAddress = 52 | AssociatedTokenAccountProgram.DeriveAssociatedTokenAccount(wallet.Account.PublicKey, new PublicKey(TokenMintAdress)); 53 | } 54 | 55 | if (_associatedTokenAddress == null) 56 | { 57 | return; 58 | } 59 | 60 | await Web3.WsRpc.SubscribeTokenAccountAsync(_associatedTokenAddress, (state, value) => 61 | { 62 | TokenAmount.text = value.Value.Data.Parsed.Info.TokenAmount.UiAmountString; 63 | Debug.Log("Token balance (Socket Token): " + value.Value.Data.Parsed.Info.TokenAmount.UiAmountString); 64 | }, Commitment.Confirmed); 65 | 66 | var tokenBalance = await wallet.ActiveRpcClient.GetTokenAccountBalanceAsync(_associatedTokenAddress, Commitment.Confirmed); 67 | if (tokenBalance.Result == null || tokenBalance.Result.Value == null) 68 | { 69 | TokenAmount.text = "0"; 70 | return; 71 | } 72 | TokenAmount.text = tokenBalance.Result.Value.UiAmountString; 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/TokenPanel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3585658f03574e5a97ec9242044a592 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/UiService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using Frictionless; 5 | using Game.Scripts.Ui; 6 | using UnityEngine; 7 | 8 | namespace Services 9 | { 10 | public class UiService : MonoBehaviour, IMultiSceneSingleton 11 | { 12 | [Serializable] 13 | public class UiRegistration 14 | { 15 | public BasePopup PopupPrefab; 16 | public ScreenType ScreenType; 17 | } 18 | 19 | public enum ScreenType 20 | { 21 | TransferNftPopup = 0, 22 | NftListPopup = 1, 23 | SessionPopup = 2 24 | } 25 | 26 | public class UiData 27 | { 28 | 29 | } 30 | 31 | public List UiRegistrations = new List(); 32 | 33 | private readonly Dictionary openPopups = new Dictionary(); 34 | 35 | public void Awake() 36 | { 37 | ServiceFactory.RegisterSingleton(this); 38 | } 39 | 40 | public void OpenPopup(ScreenType screenType, UiData uiData) 41 | { 42 | if (openPopups.TryGetValue(screenType, out BasePopup basePopup)) 43 | { 44 | basePopup.Open(uiData); 45 | return; 46 | } 47 | 48 | foreach (var uiRegistration in UiRegistrations) 49 | { 50 | if (uiRegistration.ScreenType == screenType) 51 | { 52 | BasePopup newPopup = Instantiate(uiRegistration.PopupPrefab); 53 | openPopups.Add(screenType, newPopup); 54 | newPopup.Open(uiData); 55 | return; 56 | } 57 | } 58 | 59 | Debug.LogWarning("There was no screen registration for " + screenType); 60 | } 61 | 62 | public IEnumerator HandleNewSceneLoaded() 63 | { 64 | openPopups.Clear(); 65 | yield return null; 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Scripts/Ui/UiService.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97c3b89c03d0642b4ba9d5d17d794ee1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 797beab25ada04bd7bcf99b2b2cff7a5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/Game/Sprites/background.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites/beaver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/Game/Sprites/beaver.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites/icon_energy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/Game/Sprites/icon_energy.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites/icon_solana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/Game/Sprites/icon_solana.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites/icon_usdc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/Game/Sprites/icon_usdc.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites/icon_wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/Game/Sprites/icon_wood.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/Game/Sprites/tree.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites/ui_close_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/Game/Sprites/ui_close_button.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites/ui_default_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/Game/Sprites/ui_default_button.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites/ui_element_panel_rect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/Game/Sprites/ui_element_panel_rect.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites/ui_panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/Game/Sprites/ui_panel.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Game/Sprites/ui_spinner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/Game/Sprites/ui_spinner.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfef68aa94fa04d55b99366013c49ebf 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Resources/DOTweenSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 16995157, guid: 8e4ed579406784a1b9a3caf71d435429, type: 3} 13 | m_Name: DOTweenSettings 14 | m_EditorClassIdentifier: 15 | useSafeMode: 1 16 | safeModeOptions: 17 | logBehaviour: 2 18 | nestedTweenFailureBehaviour: 0 19 | timeScale: 1 20 | unscaledTimeScale: 1 21 | useSmoothDeltaTime: 0 22 | maxSmoothUnscaledTime: 0.15 23 | rewindCallbackMode: 0 24 | showUnityEditorReport: 0 25 | logBehaviour: 0 26 | drawGizmos: 1 27 | defaultRecyclable: 0 28 | defaultAutoPlay: 3 29 | defaultUpdateType: 0 30 | defaultTimeScaleIndependent: 0 31 | defaultEaseType: 6 32 | defaultEaseOvershootOrAmplitude: 1.70158 33 | defaultEasePeriod: 0 34 | defaultAutoKill: 1 35 | defaultLoopType: 0 36 | debugMode: 0 37 | debugStoreTargetId: 1 38 | showPreviewPanel: 1 39 | storeSettingsLocation: 0 40 | modules: 41 | showPanel: 0 42 | audioEnabled: 1 43 | physicsEnabled: 1 44 | physics2DEnabled: 1 45 | spriteEnabled: 1 46 | uiEnabled: 1 47 | textMeshProEnabled: 0 48 | tk2DEnabled: 0 49 | deAudioEnabled: 0 50 | deUnityExtendedEnabled: 0 51 | epoOutlineEnabled: 0 52 | createASMDEF: 0 53 | showPlayingTweens: 0 54 | showPausedTweens: 0 55 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Resources/DOTweenSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8eb37312196a64192a02cd17b1aee004 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Resources/SolanaUnitySDK.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a7b2018811e54518890d7eb3e125dd7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Resources/SolanaUnitySDK/WalletAdapterButton.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f6f9ab42f789a4ec4baa484a9f1d0f97 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Resources/SolanaUnitySDK/WalletAdapterUI.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 256e92be2288f4b68b207a43c304ee22 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Resources/SolanaUnitySDK/[WalletController].prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &4130716992226347760 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 4130716992226347762} 12 | - component: {fileID: 7505526671927023752} 13 | - component: {fileID: 4130716992226347764} 14 | m_Layer: 0 15 | m_Name: '[WalletController]' 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &4130716992226347762 22 | Transform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 4130716992226347760} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 523.5468, y: 236.58032, z: -101.23384} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_RootOrder: 0 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!114 &7505526671927023752 37 | MonoBehaviour: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 4130716992226347760} 43 | m_Enabled: 1 44 | m_EditorHideFlags: 0 45 | m_Script: {fileID: 11500000, guid: fbd7daddfbeaa44729a122a269ac8fb5, type: 3} 46 | m_Name: 47 | m_EditorClassIdentifier: 48 | --- !u!114 &4130716992226347764 49 | MonoBehaviour: 50 | m_ObjectHideFlags: 0 51 | m_CorrespondingSourceObject: {fileID: 0} 52 | m_PrefabInstance: {fileID: 0} 53 | m_PrefabAsset: {fileID: 0} 54 | m_GameObject: {fileID: 4130716992226347760} 55 | m_Enabled: 1 56 | m_EditorHideFlags: 0 57 | m_Script: {fileID: 11500000, guid: b75a4e92c14884ea6bf3e46d07a33eb0, type: 3} 58 | m_Name: 59 | m_EditorClassIdentifier: 60 | rpcCluster: 1 61 | customRpc: https://late-wild-film.solana-devnet.quiknode.pro/8374da8d09b67ce47c9307c1863212e5710b7c69/ 62 | webSocketsRpc: 63 | autoConnectOnStartup: 1 64 | web3AuthWalletOptions: 65 | appName: Solana Unity SDK 66 | logoLight: 67 | logoDark: 68 | defaultLanguage: en 69 | dark: 1 70 | themeName: primary 71 | themeColor: '#123456' 72 | redirectUrl: torusapp://com.torus.Web3AuthUnity/auth 73 | clientId: BO4zGEzyV6DT1vHU46b6GEngOcg2jl5Pmd9Boi8dLdBpBZnS351ulHDz2k7XJ1dEm-DcvyyARivGCZDXrbZng-0 74 | network: 0 75 | solanaWalletAdapterOptions: 76 | solanaMobileWalletAdapterOptions: 77 | identityUri: https://solana.unity-sdk.gg/ 78 | iconUri: /favicon.ico 79 | name: Solana.Unity-SDK 80 | keepConnectionAlive: 1 81 | solanaWalletAdapterWebGLOptions: 82 | walletAdapterButtonPrefab: {fileID: 0} 83 | walletAdapterUIPrefab: {fileID: 0} 84 | phantomWalletOptions: 85 | phantomApiVersion: v1 86 | appMetaDataUrl: https://github.com/garbles-labs/Solana.Unity-SDK 87 | deeplinkUrlScheme: unitydl 88 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Resources/SolanaUnitySDK/[WalletController].prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a921888ae20a64ee9b9d9164b77cad74 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Socket.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e9d67e1994fd4b60b2a2284cc19546b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Socket/SocketStatusWidget.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable CS0436 2 | using Solana.Unity.SDK; 3 | using TMPro; 4 | using UnityEngine; 5 | using UnityEngine.UI; 6 | using WebSocketState = System.Net.WebSockets.WebSocketState; 7 | 8 | public class SocketStatusWidget : MonoBehaviour 9 | { 10 | public TextMeshProUGUI StatusText; 11 | public Button ReconnectButton; 12 | 13 | private void Awake() 14 | { 15 | ReconnectButton.onClick.AddListener(OnReconnectClicked); 16 | } 17 | 18 | private void OnReconnectClicked() 19 | { 20 | // Should automatically reconnect 21 | } 22 | 23 | void Update() 24 | { 25 | if (Web3.WsRpc != null) 26 | { 27 | StatusText.text = "Socket: " + Web3.WsRpc.State; 28 | ReconnectButton.gameObject.SetActive(Web3.WsRpc.State == WebSocketState.Closed); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/Socket/SocketStatusWidget.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbce47be4af1b404ab5d53d64d83a012 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f54d1bd14bd3ca042bd867b519fee8cc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Documentation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e7e8f5a82a3a134e91c54efd2274ea9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b8d251f9af63b746bf2f7ffe00ebb9b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Fonts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ab70aee4d56447429c680537fbf93ed 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e59c59b81ab47f9b6ec5781fa725d2c 3 | timeCreated: 1484171296 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Fonts/LiberationSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/TextMesh Pro/Fonts/LiberationSans.ttf -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Fonts/LiberationSans.ttf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3265ab4bf004d28a9537516768c1c75 3 | timeCreated: 1484171297 4 | licenseType: Pro 5 | TrueTypeFontImporter: 6 | serializedVersion: 2 7 | fontSize: 16 8 | forceTextureCase: -2 9 | characterSpacing: 1 10 | characterPadding: 0 11 | includeFontData: 1 12 | use2xBehaviour: 0 13 | fontNames: [] 14 | fallbackFontReferences: [] 15 | customCharacters: 16 | fontRenderingMode: 0 17 | userData: 18 | assetBundleName: 19 | assetBundleVariant: 20 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 243e06394e614e5d99fab26083b707fa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/Fonts & Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 731f1baa9d144a9897cb1d341c2092b8 3 | folderAsset: yes 4 | timeCreated: 1442040525 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: LiberationSans SDF - Drop Shadow 11 | m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} 12 | m_ShaderKeywords: OUTLINE_ON UNDERLAY_ON 13 | m_LightmapFlags: 5 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _Cube: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _FaceTex: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _MainTex: 35 | m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee, 36 | type: 2} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _OutlineTex: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | m_Floats: 44 | - _Ambient: 0.5 45 | - _Bevel: 0.5 46 | - _BevelClamp: 0 47 | - _BevelOffset: 0 48 | - _BevelRoundness: 0 49 | - _BevelWidth: 0 50 | - _BumpFace: 0 51 | - _BumpOutline: 0 52 | - _ColorMask: 15 53 | - _Diffuse: 0.5 54 | - _DiffusePower: 1 55 | - _FaceDilate: 0.1 56 | - _FaceUVSpeedX: 0 57 | - _FaceUVSpeedY: 0 58 | - _GlowInner: 0.05 59 | - _GlowOffset: 0 60 | - _GlowOuter: 0.05 61 | - _GlowPower: 0.75 62 | - _GradientScale: 10 63 | - _LightAngle: 3.1416 64 | - _MaskSoftnessX: 0 65 | - _MaskSoftnessY: 0 66 | - _OutlineSoftness: 0 67 | - _OutlineUVSpeedX: 0 68 | - _OutlineUVSpeedY: 0 69 | - _OutlineWidth: 0.1 70 | - _PerspectiveFilter: 0.875 71 | - _Reflectivity: 10 72 | - _ScaleRatioA: 0.9 73 | - _ScaleRatioB: 0.73125 74 | - _ScaleRatioC: 0.64125 75 | - _ScaleX: 1 76 | - _ScaleY: 1 77 | - _ShaderFlags: 0 78 | - _Sharpness: 0 79 | - _SpecularPower: 2 80 | - _Stencil: 0 81 | - _StencilComp: 8 82 | - _StencilOp: 0 83 | - _StencilReadMask: 255 84 | - _StencilWriteMask: 255 85 | - _TextureHeight: 1024 86 | - _TextureWidth: 1024 87 | - _UnderlayDilate: 0 88 | - _UnderlayOffsetX: 0.5 89 | - _UnderlayOffsetY: -0.5 90 | - _UnderlaySoftness: 0.05 91 | - _VertexOffsetX: 0 92 | - _VertexOffsetY: 0 93 | - _WeightBold: 0.75 94 | - _WeightNormal: 0 95 | m_Colors: 96 | - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} 97 | - _Color: {r: 1, g: 1, b: 1, a: 1} 98 | - _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} 99 | - _FaceColor: {r: 1, g: 1, b: 1, a: 1} 100 | - _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} 101 | - _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} 102 | - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} 103 | - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} 104 | - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} 105 | - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} 106 | - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} 107 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e73a58f6e2794ae7b1b7e50b7fb811b0 3 | timeCreated: 1484172806 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e498d1c8094910479dc3e1b768306a4 3 | timeCreated: 1484171803 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: LiberationSans SDF - Outline 11 | m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} 12 | m_ShaderKeywords: OUTLINE_ON 13 | m_LightmapFlags: 5 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _Cube: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _FaceTex: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _MainTex: 35 | m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee, 36 | type: 2} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _OutlineTex: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | m_Floats: 44 | - _Ambient: 0.5 45 | - _Bevel: 0.5 46 | - _BevelClamp: 0 47 | - _BevelOffset: 0 48 | - _BevelRoundness: 0 49 | - _BevelWidth: 0 50 | - _BumpFace: 0 51 | - _BumpOutline: 0 52 | - _ColorMask: 15 53 | - _Diffuse: 0.5 54 | - _FaceDilate: 0.1 55 | - _FaceUVSpeedX: 0 56 | - _FaceUVSpeedY: 0 57 | - _GlowInner: 0.05 58 | - _GlowOffset: 0 59 | - _GlowOuter: 0.05 60 | - _GlowPower: 0.75 61 | - _GradientScale: 10 62 | - _LightAngle: 3.1416 63 | - _MaskSoftnessX: 0 64 | - _MaskSoftnessY: 0 65 | - _OutlineSoftness: 0 66 | - _OutlineUVSpeedX: 0 67 | - _OutlineUVSpeedY: 0 68 | - _OutlineWidth: 0.1 69 | - _PerspectiveFilter: 0.875 70 | - _Reflectivity: 10 71 | - _ScaleRatioA: 0.9 72 | - _ScaleRatioB: 0.73125 73 | - _ScaleRatioC: 0.64125 74 | - _ScaleX: 1 75 | - _ScaleY: 1 76 | - _ShaderFlags: 0 77 | - _Sharpness: 0 78 | - _SpecularPower: 2 79 | - _Stencil: 0 80 | - _StencilComp: 8 81 | - _StencilOp: 0 82 | - _StencilReadMask: 255 83 | - _StencilWriteMask: 255 84 | - _TextureHeight: 1024 85 | - _TextureWidth: 1024 86 | - _UnderlayDilate: 0 87 | - _UnderlayOffsetX: 0 88 | - _UnderlayOffsetY: 0 89 | - _UnderlaySoftness: 0 90 | - _VertexOffsetX: 0 91 | - _VertexOffsetY: 0 92 | - _WeightBold: 0.75 93 | - _WeightNormal: 0 94 | m_Colors: 95 | - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} 96 | - _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} 97 | - _FaceColor: {r: 1, g: 1, b: 1, a: 1} 98 | - _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} 99 | - _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} 100 | - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} 101 | - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} 102 | - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} 103 | - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} 104 | - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} 105 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79459efec17a4d00a321bdcc27bbc385 3 | timeCreated: 1484172856 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f586378b4e144a9851e7b34d9b748ee 3 | timeCreated: 1484171803 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt: -------------------------------------------------------------------------------- 1 | )]}〕〉》」』】〙〗〟’”⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、%,.:;。!?]):;=}¢°"†‡℃〆%,. -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fade42e8bc714b018fac513c043d323b 3 | timeCreated: 1425440388 4 | licenseType: Store 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt: -------------------------------------------------------------------------------- 1 | ([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\[({£¥"々〇$¥₩ # -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d82c1b31c7e74239bff1220585707d2b 3 | timeCreated: 1425440388 4 | licenseType: Store 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/Sprite Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 512a49d95c0c4332bdd98131869c23c9 3 | folderAsset: yes 4 | timeCreated: 1441876896 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c41005c129ba4d66911b75229fd70b45 3 | timeCreated: 1480316912 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/Style Sheets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4aecb92fff08436c8303b10eab8da368 3 | folderAsset: yes 4 | timeCreated: 1441876950 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f952c082cb03451daed3ee968ac6c63e 3 | timeCreated: 1432805430 4 | licenseType: Store 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/TMP Settings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391, type: 3} 13 | m_Name: TMP Settings 14 | m_EditorClassIdentifier: 15 | m_enableWordWrapping: 1 16 | m_enableKerning: 1 17 | m_enableExtraPadding: 0 18 | m_enableTintAllSprites: 0 19 | m_enableParseEscapeCharacters: 1 20 | m_EnableRaycastTarget: 1 21 | m_GetFontFeaturesAtRuntime: 1 22 | m_missingGlyphCharacter: 0 23 | m_warningsDisabled: 0 24 | m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} 25 | m_defaultFontAssetPath: Fonts & Materials/ 26 | m_defaultFontSize: 36 27 | m_defaultAutoSizeMinRatio: 0.5 28 | m_defaultAutoSizeMaxRatio: 2 29 | m_defaultTextMeshProTextContainerSize: {x: 20, y: 5} 30 | m_defaultTextMeshProUITextContainerSize: {x: 200, y: 50} 31 | m_autoSizeTextContainer: 0 32 | m_fallbackFontAssets: [] 33 | m_matchMaterialPreset: 1 34 | m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45, 35 | type: 2} 36 | m_defaultSpriteAssetPath: Sprite Assets/ 37 | m_enableEmojiSupport: 1 38 | m_MissingCharacterSpriteUnicode: 0 39 | m_defaultColorGradientPresetsPath: Color Gradient Presets/ 40 | m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e, 41 | type: 2} 42 | m_StyleSheetsResourcePath: 43 | m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3} 44 | m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b, 45 | type: 3} 46 | m_UseModernHangulLineBreakingRules: 0 47 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Resources/TMP Settings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f5b5dff67a942289a9defa416b206f3 3 | timeCreated: 1436653997 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9f693669af91aa45ad615fc681ed29f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48bb5f55d8670e349b6e614913f9d910 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e3b057af24249748ff873be7fafee47 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 128e987d567d4e2c824d754223b3f3b0 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_SDF Overlay.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd89cf5b9246416f84610a006f916af7 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_SDF SSD.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14eb328de4b8eb245bb7cea29e4ac00b 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc1ede39bf3643ee8e493720e4259791 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a02a7d8c237544f1962732b55a9aebf1 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader: -------------------------------------------------------------------------------- 1 | // Simplified SDF shader: 2 | // - No Shading Option (bevel / bump / env map) 3 | // - No Glow Option 4 | // - Softness is applied on both side of the outline 5 | 6 | Shader "TextMeshPro/Mobile/Distance Field SSD" { 7 | 8 | Properties { 9 | [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1) 10 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0 11 | 12 | [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1) 13 | _OutlineWidth ("Outline Thickness", Range(0,1)) = 0 14 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 15 | 16 | [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5) 17 | _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 18 | _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 19 | _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 20 | _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 21 | 22 | _WeightNormal ("Weight Normal", float) = 0 23 | _WeightBold ("Weight Bold", float) = .5 24 | 25 | _ShaderFlags ("Flags", float) = 0 26 | _ScaleRatioA ("Scale RatioA", float) = 1 27 | _ScaleRatioB ("Scale RatioB", float) = 1 28 | _ScaleRatioC ("Scale RatioC", float) = 1 29 | 30 | _MainTex ("Font Atlas", 2D) = "white" {} 31 | _TextureWidth ("Texture Width", float) = 512 32 | _TextureHeight ("Texture Height", float) = 512 33 | _GradientScale ("Gradient Scale", float) = 5 34 | _ScaleX ("Scale X", float) = 1 35 | _ScaleY ("Scale Y", float) = 1 36 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 37 | _Sharpness ("Sharpness", Range(-1,1)) = 0 38 | 39 | _VertexOffsetX ("Vertex OffsetX", float) = 0 40 | _VertexOffsetY ("Vertex OffsetY", float) = 0 41 | 42 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) 43 | _MaskSoftnessX ("Mask SoftnessX", float) = 0 44 | _MaskSoftnessY ("Mask SoftnessY", float) = 0 45 | _MaskTex ("Mask Texture", 2D) = "white" {} 46 | _MaskInverse ("Inverse", float) = 0 47 | _MaskEdgeColor ("Edge Color", Color) = (1,1,1,1) 48 | _MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01 49 | _MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5 50 | 51 | _StencilComp ("Stencil Comparison", Float) = 8 52 | _Stencil ("Stencil ID", Float) = 0 53 | _StencilOp ("Stencil Operation", Float) = 0 54 | _StencilWriteMask ("Stencil Write Mask", Float) = 255 55 | _StencilReadMask ("Stencil Read Mask", Float) = 255 56 | 57 | _CullMode ("Cull Mode", Float) = 0 58 | _ColorMask ("Color Mask", Float) = 15 59 | } 60 | 61 | SubShader { 62 | Tags { 63 | "Queue"="Transparent" 64 | "IgnoreProjector"="True" 65 | "RenderType"="Transparent" 66 | } 67 | 68 | Stencil 69 | { 70 | Ref [_Stencil] 71 | Comp [_StencilComp] 72 | Pass [_StencilOp] 73 | ReadMask [_StencilReadMask] 74 | WriteMask [_StencilWriteMask] 75 | } 76 | 77 | Cull [_CullMode] 78 | ZWrite Off 79 | Lighting Off 80 | Fog { Mode Off } 81 | ZTest [unity_GUIZTestMode] 82 | Blend One OneMinusSrcAlpha 83 | ColorMask [_ColorMask] 84 | 85 | Pass { 86 | CGPROGRAM 87 | #pragma vertex VertShader 88 | #pragma fragment PixShader 89 | #pragma shader_feature __ OUTLINE_ON 90 | #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER 91 | 92 | #pragma multi_compile __ UNITY_UI_CLIP_RECT 93 | #pragma multi_compile __ UNITY_UI_ALPHACLIP 94 | 95 | #include "UnityCG.cginc" 96 | #include "UnityUI.cginc" 97 | #include "TMPro_Properties.cginc" 98 | 99 | #include "TMPro_Mobile.cginc" 100 | 101 | ENDCG 102 | } 103 | } 104 | 105 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" 106 | } 107 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8d12adcee749c344b8117cf7c7eb912 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe393ace9b354375a9cb14cdbbc28be4 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85187c2149c549c5b33f0cdb02836b17 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7ada0af4f174f0694ca6a487b8f543d 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_SDF.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68e6db2ebdc24f95958faec2be5558d6 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader: -------------------------------------------------------------------------------- 1 | Shader "TextMeshPro/Sprite" 2 | { 3 | Properties 4 | { 5 | [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} 6 | _Color ("Tint", Color) = (1,1,1,1) 7 | 8 | _StencilComp ("Stencil Comparison", Float) = 8 9 | _Stencil ("Stencil ID", Float) = 0 10 | _StencilOp ("Stencil Operation", Float) = 0 11 | _StencilWriteMask ("Stencil Write Mask", Float) = 255 12 | _StencilReadMask ("Stencil Read Mask", Float) = 255 13 | 14 | _CullMode ("Cull Mode", Float) = 0 15 | _ColorMask ("Color Mask", Float) = 15 16 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) 17 | 18 | [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 19 | } 20 | 21 | SubShader 22 | { 23 | Tags 24 | { 25 | "Queue"="Transparent" 26 | "IgnoreProjector"="True" 27 | "RenderType"="Transparent" 28 | "PreviewType"="Plane" 29 | "CanUseSpriteAtlas"="True" 30 | } 31 | 32 | Stencil 33 | { 34 | Ref [_Stencil] 35 | Comp [_StencilComp] 36 | Pass [_StencilOp] 37 | ReadMask [_StencilReadMask] 38 | WriteMask [_StencilWriteMask] 39 | } 40 | 41 | Cull [_CullMode] 42 | Lighting Off 43 | ZWrite Off 44 | ZTest [unity_GUIZTestMode] 45 | Blend SrcAlpha OneMinusSrcAlpha 46 | ColorMask [_ColorMask] 47 | 48 | Pass 49 | { 50 | Name "Default" 51 | CGPROGRAM 52 | #pragma vertex vert 53 | #pragma fragment frag 54 | #pragma target 2.0 55 | 56 | #include "UnityCG.cginc" 57 | #include "UnityUI.cginc" 58 | 59 | #pragma multi_compile __ UNITY_UI_CLIP_RECT 60 | #pragma multi_compile __ UNITY_UI_ALPHACLIP 61 | 62 | struct appdata_t 63 | { 64 | float4 vertex : POSITION; 65 | float4 color : COLOR; 66 | float2 texcoord : TEXCOORD0; 67 | UNITY_VERTEX_INPUT_INSTANCE_ID 68 | }; 69 | 70 | struct v2f 71 | { 72 | float4 vertex : SV_POSITION; 73 | fixed4 color : COLOR; 74 | float2 texcoord : TEXCOORD0; 75 | float4 worldPosition : TEXCOORD1; 76 | UNITY_VERTEX_OUTPUT_STEREO 77 | }; 78 | 79 | sampler2D _MainTex; 80 | fixed4 _Color; 81 | fixed4 _TextureSampleAdd; 82 | float4 _ClipRect; 83 | float4 _MainTex_ST; 84 | 85 | v2f vert(appdata_t v) 86 | { 87 | v2f OUT; 88 | UNITY_SETUP_INSTANCE_ID(v); 89 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT); 90 | OUT.worldPosition = v.vertex; 91 | OUT.vertex = UnityObjectToClipPos(OUT.worldPosition); 92 | 93 | OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); 94 | 95 | OUT.color = v.color * _Color; 96 | return OUT; 97 | } 98 | 99 | fixed4 frag(v2f IN) : SV_Target 100 | { 101 | half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color; 102 | 103 | #ifdef UNITY_UI_CLIP_RECT 104 | color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect); 105 | #endif 106 | 107 | #ifdef UNITY_UI_ALPHACLIP 108 | clip (color.a - 0.001); 109 | #endif 110 | 111 | return color; 112 | } 113 | ENDCG 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf81c85f95fe47e1a27f6ae460cf182c 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMPro.cginc: -------------------------------------------------------------------------------- 1 | float2 UnpackUV(float uv) 2 | { 3 | float2 output; 4 | output.x = floor(uv / 4096); 5 | output.y = uv - 4096 * output.x; 6 | 7 | return output * 0.001953125; 8 | } 9 | 10 | fixed4 GetColor(half d, fixed4 faceColor, fixed4 outlineColor, half outline, half softness) 11 | { 12 | half faceAlpha = 1-saturate((d - outline * 0.5 + softness * 0.5) / (1.0 + softness)); 13 | half outlineAlpha = saturate((d + outline * 0.5)) * sqrt(min(1.0, outline)); 14 | 15 | faceColor.rgb *= faceColor.a; 16 | outlineColor.rgb *= outlineColor.a; 17 | 18 | faceColor = lerp(faceColor, outlineColor, outlineAlpha); 19 | 20 | faceColor *= faceAlpha; 21 | 22 | return faceColor; 23 | } 24 | 25 | float3 GetSurfaceNormal(float4 h, float bias) 26 | { 27 | bool raisedBevel = step(1, fmod(_ShaderFlags, 2)); 28 | 29 | h += bias+_BevelOffset; 30 | 31 | float bevelWidth = max(.01, _OutlineWidth+_BevelWidth); 32 | 33 | // Track outline 34 | h -= .5; 35 | h /= bevelWidth; 36 | h = saturate(h+.5); 37 | 38 | if(raisedBevel) h = 1 - abs(h*2.0 - 1.0); 39 | h = lerp(h, sin(h*3.141592/2.0), _BevelRoundness); 40 | h = min(h, 1.0-_BevelClamp); 41 | h *= _Bevel * bevelWidth * _GradientScale * -2.0; 42 | 43 | float3 va = normalize(float3(1.0, 0.0, h.y - h.x)); 44 | float3 vb = normalize(float3(0.0, -1.0, h.w - h.z)); 45 | 46 | return cross(va, vb); 47 | } 48 | 49 | float3 GetSurfaceNormal(float2 uv, float bias, float3 delta) 50 | { 51 | // Read "height field" 52 | float4 h = {tex2D(_MainTex, uv - delta.xz).a, 53 | tex2D(_MainTex, uv + delta.xz).a, 54 | tex2D(_MainTex, uv - delta.zy).a, 55 | tex2D(_MainTex, uv + delta.zy).a}; 56 | 57 | return GetSurfaceNormal(h, bias); 58 | } 59 | 60 | float3 GetSpecular(float3 n, float3 l) 61 | { 62 | float spec = pow(max(0.0, dot(n, l)), _Reflectivity); 63 | return _SpecularColor.rgb * spec * _SpecularPower; 64 | } 65 | 66 | float4 GetGlowColor(float d, float scale) 67 | { 68 | float glow = d - (_GlowOffset*_ScaleRatioB) * 0.5 * scale; 69 | float t = lerp(_GlowInner, (_GlowOuter * _ScaleRatioB), step(0.0, glow)) * 0.5 * scale; 70 | glow = saturate(abs(glow/(1.0 + t))); 71 | glow = 1.0-pow(glow, _GlowPower); 72 | glow *= sqrt(min(1.0, t)); // Fade off glow thinner than 1 screen pixel 73 | return float4(_GlowColor.rgb, saturate(_GlowColor.a * glow * 2)); 74 | } 75 | 76 | float4 BlendARGB(float4 overlying, float4 underlying) 77 | { 78 | overlying.rgb *= overlying.a; 79 | underlying.rgb *= underlying.a; 80 | float3 blended = overlying.rgb + ((1-overlying.a)*underlying.rgb); 81 | float alpha = underlying.a + (1-underlying.a)*overlying.a; 82 | return float4(blended, alpha); 83 | } 84 | 85 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMPro.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 407bc68d299748449bbf7f48ee690f8d 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c334973cef89a9840b0b0c507e0377ab 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc: -------------------------------------------------------------------------------- 1 | // UI Editable properties 2 | uniform sampler2D _FaceTex; // Alpha : Signed Distance 3 | uniform float _FaceUVSpeedX; 4 | uniform float _FaceUVSpeedY; 5 | uniform fixed4 _FaceColor; // RGBA : Color + Opacity 6 | uniform float _FaceDilate; // v[ 0, 1] 7 | uniform float _OutlineSoftness; // v[ 0, 1] 8 | 9 | uniform sampler2D _OutlineTex; // RGBA : Color + Opacity 10 | uniform float _OutlineUVSpeedX; 11 | uniform float _OutlineUVSpeedY; 12 | uniform fixed4 _OutlineColor; // RGBA : Color + Opacity 13 | uniform float _OutlineWidth; // v[ 0, 1] 14 | 15 | uniform float _Bevel; // v[ 0, 1] 16 | uniform float _BevelOffset; // v[-1, 1] 17 | uniform float _BevelWidth; // v[-1, 1] 18 | uniform float _BevelClamp; // v[ 0, 1] 19 | uniform float _BevelRoundness; // v[ 0, 1] 20 | 21 | uniform sampler2D _BumpMap; // Normal map 22 | uniform float _BumpOutline; // v[ 0, 1] 23 | uniform float _BumpFace; // v[ 0, 1] 24 | 25 | uniform samplerCUBE _Cube; // Cube / sphere map 26 | uniform fixed4 _ReflectFaceColor; // RGB intensity 27 | uniform fixed4 _ReflectOutlineColor; 28 | //uniform float _EnvTiltX; // v[-1, 1] 29 | //uniform float _EnvTiltY; // v[-1, 1] 30 | uniform float3 _EnvMatrixRotation; 31 | uniform float4x4 _EnvMatrix; 32 | 33 | uniform fixed4 _SpecularColor; // RGB intensity 34 | uniform float _LightAngle; // v[ 0,Tau] 35 | uniform float _SpecularPower; // v[ 0, 1] 36 | uniform float _Reflectivity; // v[ 5, 15] 37 | uniform float _Diffuse; // v[ 0, 1] 38 | uniform float _Ambient; // v[ 0, 1] 39 | 40 | uniform fixed4 _UnderlayColor; // RGBA : Color + Opacity 41 | uniform float _UnderlayOffsetX; // v[-1, 1] 42 | uniform float _UnderlayOffsetY; // v[-1, 1] 43 | uniform float _UnderlayDilate; // v[-1, 1] 44 | uniform float _UnderlaySoftness; // v[ 0, 1] 45 | 46 | uniform fixed4 _GlowColor; // RGBA : Color + Intesity 47 | uniform float _GlowOffset; // v[-1, 1] 48 | uniform float _GlowOuter; // v[ 0, 1] 49 | uniform float _GlowInner; // v[ 0, 1] 50 | uniform float _GlowPower; // v[ 1, 1/(1+4*4)] 51 | 52 | // API Editable properties 53 | uniform float _ShaderFlags; 54 | uniform float _WeightNormal; 55 | uniform float _WeightBold; 56 | 57 | uniform float _ScaleRatioA; 58 | uniform float _ScaleRatioB; 59 | uniform float _ScaleRatioC; 60 | 61 | uniform float _VertexOffsetX; 62 | uniform float _VertexOffsetY; 63 | 64 | //uniform float _UseClipRect; 65 | uniform float _MaskID; 66 | uniform sampler2D _MaskTex; 67 | uniform float4 _MaskCoord; 68 | uniform float4 _ClipRect; // bottom left(x,y) : top right(z,w) 69 | //uniform float _MaskWipeControl; 70 | //uniform float _MaskEdgeSoftness; 71 | //uniform fixed4 _MaskEdgeColor; 72 | //uniform bool _MaskInverse; 73 | 74 | uniform float _MaskSoftnessX; 75 | uniform float _MaskSoftnessY; 76 | 77 | // Font Atlas properties 78 | uniform sampler2D _MainTex; 79 | uniform float _TextureWidth; 80 | uniform float _TextureHeight; 81 | uniform float _GradientScale; 82 | uniform float _ScaleX; 83 | uniform float _ScaleY; 84 | uniform float _PerspectiveFilter; 85 | uniform float _Sharpness; 86 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3997e2241185407d80309a82f9148466 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc: -------------------------------------------------------------------------------- 1 | void VertShader(inout appdata_full v, out Input data) 2 | { 3 | v.vertex.x += _VertexOffsetX; 4 | v.vertex.y += _VertexOffsetY; 5 | 6 | UNITY_INITIALIZE_OUTPUT(Input, data); 7 | 8 | float bold = step(v.texcoord1.y, 0); 9 | 10 | // Generate normal for backface 11 | float3 view = ObjSpaceViewDir(v.vertex); 12 | v.normal *= sign(dot(v.normal, view)); 13 | 14 | #if USE_DERIVATIVE 15 | data.param.y = 1; 16 | #else 17 | float4 vert = v.vertex; 18 | float4 vPosition = UnityObjectToClipPos(vert); 19 | float2 pixelSize = vPosition.w; 20 | 21 | pixelSize /= float2(_ScaleX, _ScaleY) * mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy); 22 | float scale = rsqrt(dot(pixelSize, pixelSize)); 23 | scale *= abs(v.texcoord1.y) * _GradientScale * (_Sharpness + 1); 24 | scale = lerp(scale * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(v.normal.xyz), normalize(WorldSpaceViewDir(vert))))); 25 | data.param.y = scale; 26 | #endif 27 | 28 | data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; // 29 | 30 | v.texcoord1.xy = UnpackUV(v.texcoord1.x); 31 | data.viewDirEnv = mul((float3x3)_EnvMatrix, WorldSpaceViewDir(v.vertex)); 32 | } 33 | 34 | void PixShader(Input input, inout SurfaceOutput o) 35 | { 36 | 37 | #if USE_DERIVATIVE 38 | float2 pixelSize = float2(ddx(input.uv_MainTex.y), ddy(input.uv_MainTex.y)); 39 | pixelSize *= _TextureWidth * .75; 40 | float scale = rsqrt(dot(pixelSize, pixelSize)) * _GradientScale * (_Sharpness + 1); 41 | #else 42 | float scale = input.param.y; 43 | #endif 44 | 45 | // Signed distance 46 | float c = tex2D(_MainTex, input.uv_MainTex).a; 47 | float sd = (.5 - c - input.param.x) * scale + .5; 48 | float outline = _OutlineWidth*_ScaleRatioA * scale; 49 | float softness = _OutlineSoftness*_ScaleRatioA * scale; 50 | 51 | // Color & Alpha 52 | float4 faceColor = _FaceColor; 53 | float4 outlineColor = _OutlineColor; 54 | faceColor *= input.color; 55 | outlineColor.a *= input.color.a; 56 | faceColor *= tex2D(_FaceTex, float2(input.uv2_FaceTex.x + _FaceUVSpeedX * _Time.y, input.uv2_FaceTex.y + _FaceUVSpeedY * _Time.y)); 57 | outlineColor *= tex2D(_OutlineTex, float2(input.uv2_OutlineTex.x + _OutlineUVSpeedX * _Time.y, input.uv2_OutlineTex.y + _OutlineUVSpeedY * _Time.y)); 58 | faceColor = GetColor(sd, faceColor, outlineColor, outline, softness); 59 | faceColor.rgb /= max(faceColor.a, 0.0001); 60 | 61 | #if BEVEL_ON 62 | float3 delta = float3(1.0 / _TextureWidth, 1.0 / _TextureHeight, 0.0); 63 | 64 | float4 smp4x = {tex2D(_MainTex, input.uv_MainTex - delta.xz).a, 65 | tex2D(_MainTex, input.uv_MainTex + delta.xz).a, 66 | tex2D(_MainTex, input.uv_MainTex - delta.zy).a, 67 | tex2D(_MainTex, input.uv_MainTex + delta.zy).a }; 68 | 69 | // Face Normal 70 | float3 n = GetSurfaceNormal(smp4x, input.param.x); 71 | 72 | // Bumpmap 73 | float3 bump = UnpackNormal(tex2D(_BumpMap, input.uv2_FaceTex.xy)).xyz; 74 | bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5)); 75 | bump = lerp(float3(0, 0, 1), bump, faceColor.a); 76 | n = normalize(n - bump); 77 | 78 | // Cubemap reflection 79 | fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDirEnv, mul((float3x3)unity_ObjectToWorld, n))); 80 | float3 emission = reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a; 81 | #else 82 | float3 n = float3(0, 0, -1); 83 | float3 emission = float3(0, 0, 0); 84 | #endif 85 | 86 | #if GLOW_ON 87 | float4 glowColor = GetGlowColor(sd, scale); 88 | glowColor.a *= input.color.a; 89 | emission += glowColor.rgb*glowColor.a; 90 | faceColor = BlendARGB(glowColor, faceColor); 91 | faceColor.rgb /= max(faceColor.a, 0.0001); 92 | #endif 93 | 94 | // Set Standard output structure 95 | o.Albedo = faceColor.rgb; 96 | o.Normal = -n; 97 | o.Emission = emission; 98 | o.Specular = lerp(_FaceShininess, _OutlineShininess, saturate(sd + outline * 0.5)); 99 | o.Gloss = 1; 100 | o.Alpha = faceColor.a; 101 | } 102 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d930090c0cd643c7b55f19a38538c162 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Sprites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0603b6d5186471b96c778c3949c7ce2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt: -------------------------------------------------------------------------------- 1 | This sample of beautiful emojis are provided by EmojiOne https://www.emojione.com/ 2 | 3 | Please visit their website to view the complete set of their emojis and review their licensing terms. -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 381dcb09d5029d14897e55f98031fca5 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Sprites/EmojiOne.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f05276190cf498a8153f6cbe761d4e6 3 | timeCreated: 1480316860 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/TextMesh Pro/Sprites/EmojiOne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/TextMesh Pro/Sprites/EmojiOne.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9c1615f1297d4c088f3d66c6b38fc04 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86f6cc1756ed048dcb9afe692f656aa7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0b7961cfaa634963a1bda16a71e13d0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/favicon.ico -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/favicon.ico.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abdfcc06f739a4799b93b04280b6ab3e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/fullscreen-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/fullscreen-button.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/fullscreen-button.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38b10a7e2dd4541148008e8d4d1b2a26 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/progress-bar-empty-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/progress-bar-empty-dark.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/progress-bar-empty-dark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98f2c524f304b4f4398a11b844df981d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/progress-bar-empty-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/progress-bar-empty-light.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/progress-bar-empty-light.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c82f7b79c42541c18f45689bcf0a968 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/progress-bar-full-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/progress-bar-full-dark.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/progress-bar-full-dark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3639e01a00fa40cf940504c9b1df71e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/progress-bar-full-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/progress-bar-full-light.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/progress-bar-full-light.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9af76d225c9f442568802f71bbb474ea 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/style.css: -------------------------------------------------------------------------------- 1 | body { padding: 0; margin: 0 } 2 | #unity-container { position: absolute } 3 | #unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) } 4 | #unity-container.unity-mobile { width: 100%; height: 100% } 5 | #unity-canvas { background: {{{ BACKGROUND_COLOR }}} } 6 | .unity-mobile #unity-canvas { width: 100%; height: 100% } 7 | #unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none } 8 | #unity-logo { width: 154px; height: 130px; background: url('unity-logo-{{{ SPLASH_SCREEN_STYLE.toLowerCase() }}}.png') no-repeat center } 9 | #unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-{{{ SPLASH_SCREEN_STYLE.toLowerCase() }}}.png') no-repeat center } 10 | #unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-{{{ SPLASH_SCREEN_STYLE.toLowerCase() }}}.png') no-repeat center } 11 | #unity-footer { position: relative } 12 | .unity-mobile #unity-footer { display: none } 13 | #unity-webgl-logo { float:left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center } 14 | #unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px } 15 | #unity-fullscreen-button { float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center } 16 | #unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none } 17 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/style.css.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed7cd6ee995dd44bab8d5176189c53f4 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/unity-logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/unity-logo-dark.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/unity-logo-dark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97b96993a142f46efa2c9b72ef509c53 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/unity-logo-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/unity-logo-light.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/unity-logo-light.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04dd34ecadec142fd8275541850d2551 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/webgl-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/webgl-logo.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/TemplateData/webgl-logo.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0010688ddafe24168a3f097099ab2891 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/index.html.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f66a63a411d4745af95fd5e3746ae712 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/thumbnail.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/SolanaWebGlTemplate/thumbnail.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 379f39b01ffff46ec87ef8e07903ae33 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/xNFT.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d52c7f847803d4c23b47396e4f445d5f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/xNFT/index.html.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9569a4b7dfbf41a3b6cbfa70eadf665 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/xNFT/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/Assets/WebGLTemplates/xNFT/thumbnail.png -------------------------------------------------------------------------------- /unity/Lumberjack/Assets/WebGLTemplates/xNFT/thumbnail.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed0446e2bc30b42629d9dc78f55c4c5b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.solana.unity_sdk": "https://github.com/magicblock-labs/Solana.Unity-SDK.git", 4 | "com.unity.2d.sprite": "1.0.0", 5 | "com.unity.collab-proxy": "2.2.0", 6 | "com.unity.feature.development": "1.0.1", 7 | "com.unity.ide.rider": "3.0.25", 8 | "com.unity.ide.visualstudio": "2.0.21", 9 | "com.unity.ide.vscode": "1.2.5", 10 | "com.unity.test-framework": "1.1.33", 11 | "com.unity.textmeshpro": "3.0.6", 12 | "com.unity.timeline": "1.6.5", 13 | "com.unity.ugui": "1.0.0", 14 | "com.unity.visualscripting": "1.9.1", 15 | "com.unity.modules.ai": "1.0.0", 16 | "com.unity.modules.androidjni": "1.0.0", 17 | "com.unity.modules.animation": "1.0.0", 18 | "com.unity.modules.assetbundle": "1.0.0", 19 | "com.unity.modules.audio": "1.0.0", 20 | "com.unity.modules.cloth": "1.0.0", 21 | "com.unity.modules.director": "1.0.0", 22 | "com.unity.modules.imageconversion": "1.0.0", 23 | "com.unity.modules.imgui": "1.0.0", 24 | "com.unity.modules.jsonserialize": "1.0.0", 25 | "com.unity.modules.particlesystem": "1.0.0", 26 | "com.unity.modules.physics": "1.0.0", 27 | "com.unity.modules.physics2d": "1.0.0", 28 | "com.unity.modules.screencapture": "1.0.0", 29 | "com.unity.modules.terrain": "1.0.0", 30 | "com.unity.modules.terrainphysics": "1.0.0", 31 | "com.unity.modules.tilemap": "1.0.0", 32 | "com.unity.modules.ui": "1.0.0", 33 | "com.unity.modules.uielements": "1.0.0", 34 | "com.unity.modules.umbra": "1.0.0", 35 | "com.unity.modules.unityanalytics": "1.0.0", 36 | "com.unity.modules.unitywebrequest": "1.0.0", 37 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 38 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 39 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 40 | "com.unity.modules.unitywebrequestwww": "1.0.0", 41 | "com.unity.modules.vehicles": "1.0.0", 42 | "com.unity.modules.video": "1.0.0", 43 | "com.unity.modules.vr": "1.0.0", 44 | "com.unity.modules.wind": "1.0.0", 45 | "com.unity.modules.xr": "1.0.0" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Game/Scenes/LoginScene.unity 10 | guid: 325f7fb08642c46a6a1d7f860111bd4b 11 | - enabled: 1 12 | path: Assets/Game/Scenes/GameScene.unity 13 | guid: a3de581c39b3447939f31966c9c9d8fb 14 | m_configObjects: {} 15 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | m_SeeAllPackageVersions: 0 20 | oneTimeWarningShown: 0 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_UserSelectedRegistryName: 29 | m_UserAddingNewScopedRegistry: 0 30 | m_RegistryInfoDraft: 31 | m_Modified: 0 32 | m_ErrorMessage: 33 | m_UserModificationsInstanceId: -830 34 | m_OriginalInstanceId: -832 35 | m_LoadAssets: 0 36 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "m_Name": "Settings", 3 | "m_Path": "ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json", 4 | "m_Dictionary": { 5 | "m_DictionaryValues": [] 6 | } 7 | } -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2021.3.32f1 2 | m_EditorVersionWithRevision: 2021.3.32f1 (3b9dae9532f5) 3 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /unity/Lumberjack/ProjectSettings/boot.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solana-developers/solana-game-preset/5cb0cf77ede0b6cc92dee18513687bd7aa04b8f0/unity/Lumberjack/ProjectSettings/boot.config -------------------------------------------------------------------------------- /unity/Lumberjack/UserSettings/EditorUserSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!162 &1 4 | EditorUserSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ConfigSettings: 8 | RecentlyUsedSceneGuid-0: 9 | value: 5a5757560101590a5d0c0e24427b5d44434e4c7a7b7a23677f2b4565b7b5353a 10 | flags: 0 11 | RecentlyUsedSceneGuid-1: 12 | value: 5b53075e56010b0e5f580e73147a5944404f4f2b2a7977602f7f4532e7e43561 13 | flags: 0 14 | RecentlyUsedSceneGuid-2: 15 | value: 02025003500d58585e570e7144770849454e1e797d7170662e701e6ae6b8323a 16 | flags: 0 17 | RecentlyUsedSceneGuid-3: 18 | value: 5003010052530b0b55585870137709114016492e7b2e7e667d784c62e0e4603a 19 | flags: 0 20 | vcSharedLogLevel: 21 | value: 0d5e400f0650 22 | flags: 0 23 | m_VCAutomaticAdd: 1 24 | m_VCDebugCom: 0 25 | m_VCDebugCmd: 0 26 | m_VCDebugOut: 0 27 | m_SemanticMergeMode: 2 28 | m_DesiredImportWorkerCount: 2 29 | m_StandbyImportWorkerCount: 2 30 | m_IdleImportWorkerShutdownDelay: 60000 31 | m_VCShowFailedCheckout: 1 32 | m_VCOverwriteFailedCheckoutAssets: 1 33 | m_VCProjectOverlayIcons: 1 34 | m_VCHierarchyOverlayIcons: 1 35 | m_VCOtherOverlayIcons: 1 36 | m_VCAllowAsyncUpdate: 1 37 | m_ArtifactGarbageCollection: 1 38 | -------------------------------------------------------------------------------- /unity/Lumberjack/UserSettings/Search.settings: -------------------------------------------------------------------------------- 1 | {} --------------------------------------------------------------------------------