├── .gitignore ├── PouBeLike ├── Resources │ ├── Images │ │ ├── duck.png │ │ ├── capybara.png │ │ ├── botao_agua.png │ │ ├── icon_fome.png │ │ ├── icon_sede.png │ │ ├── botao_brincar.png │ │ ├── botao_comida.png │ │ ├── orangotengo.png │ │ ├── tela_de_morte.png │ │ ├── botao_troca_pet.png │ │ ├── icon_felicidade.png │ │ ├── tela_de_fundo.jpeg │ │ ├── botao_seta_direita.png │ │ ├── tela_de_fundo_2.jpeg │ │ └── botao_seta_esquerda.png │ ├── Fonts │ │ ├── OpenSans-Regular.ttf │ │ └── OpenSans-Semibold.ttf │ ├── AppIcon │ │ ├── appicon.svg │ │ └── appiconfg.svg │ ├── Raw │ │ └── AboutAssets.txt │ ├── Splash │ │ └── splash.svg │ └── Styles │ │ ├── Colors.xaml │ │ └── Styles.xaml ├── AppShell.xaml.cs ├── Properties │ └── launchSettings.json ├── App.xaml.cs ├── Platforms │ ├── Android │ │ ├── Resources │ │ │ └── values │ │ │ │ └── colors.xml │ │ ├── MainApplication.cs │ │ ├── AndroidManifest.xml │ │ └── MainActivity.cs │ ├── iOS │ │ ├── AppDelegate.cs │ │ ├── Program.cs │ │ └── Info.plist │ ├── MacCatalyst │ │ ├── AppDelegate.cs │ │ ├── Program.cs │ │ ├── Entitlements.Debug.plist │ │ ├── Entitlements.Release.plist │ │ └── Info.plist │ ├── Windows │ │ ├── App.xaml │ │ ├── app.manifest │ │ ├── App.xaml.cs │ │ └── Package.appxmanifest │ └── Tizen │ │ ├── Main.cs │ │ └── tizen-manifest.xml ├── Duck.cs ├── Capybara.cs ├── Orangotango.cs ├── AppShell.xaml ├── MauiProgram.cs ├── App.xaml ├── Character.cs ├── PouBeLike.csproj ├── MainPage.xaml.cs └── MainPage.xaml └── PouBeLike.sln /.gitignore: -------------------------------------------------------------------------------- 1 | /PouBeLike/bin 2 | /PouBeLike/obj -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/duck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/duck.png -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/capybara.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/capybara.png -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/botao_agua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/botao_agua.png -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/icon_fome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/icon_fome.png -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/icon_sede.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/icon_sede.png -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/botao_brincar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/botao_brincar.png -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/botao_comida.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/botao_comida.png -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/orangotengo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/orangotengo.png -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/tela_de_morte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/tela_de_morte.png -------------------------------------------------------------------------------- /PouBeLike/Resources/Fonts/OpenSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Fonts/OpenSans-Regular.ttf -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/botao_troca_pet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/botao_troca_pet.png -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/icon_felicidade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/icon_felicidade.png -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/tela_de_fundo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/tela_de_fundo.jpeg -------------------------------------------------------------------------------- /PouBeLike/Resources/Fonts/OpenSans-Semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Fonts/OpenSans-Semibold.ttf -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/botao_seta_direita.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/botao_seta_direita.png -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/tela_de_fundo_2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/tela_de_fundo_2.jpeg -------------------------------------------------------------------------------- /PouBeLike/Resources/Images/botao_seta_esquerda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KINDERzin/PouBeLike/HEAD/PouBeLike/Resources/Images/botao_seta_esquerda.png -------------------------------------------------------------------------------- /PouBeLike/AppShell.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace PouBeLike; 2 | 3 | public partial class AppShell : Shell 4 | { 5 | public AppShell() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /PouBeLike/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Windows Machine": { 4 | "commandName": "MsixPackage", 5 | "nativeDebugging": false 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /PouBeLike/App.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace PouBeLike; 2 | 3 | public partial class App : Application 4 | { 5 | public App() 6 | { 7 | InitializeComponent(); 8 | 9 | MainPage = new AppShell(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #512BD4 4 | #2B0B98 5 | #2B0B98 6 | -------------------------------------------------------------------------------- /PouBeLike/Resources/AppIcon/appicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | 3 | namespace PouBeLike; 4 | 5 | [Register("AppDelegate")] 6 | public class AppDelegate : MauiUIApplicationDelegate 7 | { 8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 9 | } 10 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/MacCatalyst/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | 3 | namespace PouBeLike; 4 | 5 | [Register("AppDelegate")] 6 | public class AppDelegate : MauiUIApplicationDelegate 7 | { 8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 9 | } 10 | -------------------------------------------------------------------------------- /PouBeLike/Duck.cs: -------------------------------------------------------------------------------- 1 | namespace PouBeLike; 2 | 3 | public class Duck : Character 4 | { 5 | public Duck() 6 | { 7 | FotoPersonagem="duck.png"; 8 | NomePersonagem = "Douglas, o pato agiota"; 9 | TelaMorte = "tela_de_morte.png"; 10 | AnimalMorto = false; 11 | } 12 | } -------------------------------------------------------------------------------- /PouBeLike/Capybara.cs: -------------------------------------------------------------------------------- 1 | namespace PouBeLike; 2 | 3 | public class Capybara : Character 4 | { 5 | 6 | public Capybara() 7 | { 8 | FotoPersonagem = "capybara.png"; 9 | TelaMorte = "tela_de_morte.png"; 10 | NomePersonagem = "Sir Capivaldo, o chefe da máfia"; 11 | AnimalMorto = false; 12 | } 13 | } -------------------------------------------------------------------------------- /PouBeLike/Orangotango.cs: -------------------------------------------------------------------------------- 1 | namespace PouBeLike; 2 | 3 | public class Orangotango : Character 4 | { 5 | public Orangotango() 6 | { 7 | FotoPersonagem = "orangotengo.png"; 8 | NomePersonagem = "Orengotengo, o mano da bomba"; 9 | TelaMorte = "tela_de_morte.png"; 10 | AnimalMorto = false; 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /PouBeLike/Platforms/Windows/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/Tizen/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Maui; 3 | using Microsoft.Maui.Hosting; 4 | 5 | namespace PouBeLike; 6 | 7 | class Program : MauiApplication 8 | { 9 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 10 | 11 | static void Main(string[] args) 12 | { 13 | var app = new Program(); 14 | app.Run(args); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/Android/MainApplication.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Runtime; 3 | 4 | namespace PouBeLike; 5 | 6 | [Application] 7 | public class MainApplication : MauiApplication 8 | { 9 | public MainApplication(IntPtr handle, JniHandleOwnership ownership) 10 | : base(handle, ownership) 11 | { 12 | } 13 | 14 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 15 | } 16 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/iOS/Program.cs: -------------------------------------------------------------------------------- 1 | using ObjCRuntime; 2 | using UIKit; 3 | 4 | namespace PouBeLike; 5 | 6 | public class Program 7 | { 8 | // This is the main entry point of the application. 9 | static void Main(string[] args) 10 | { 11 | // if you want to use a different Application Delegate class from "AppDelegate" 12 | // you can specify it here. 13 | UIApplication.Main(args, null, typeof(AppDelegate)); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/MacCatalyst/Program.cs: -------------------------------------------------------------------------------- 1 | using ObjCRuntime; 2 | using UIKit; 3 | 4 | namespace PouBeLike; 5 | 6 | public class Program 7 | { 8 | // This is the main entry point of the application. 9 | static void Main(string[] args) 10 | { 11 | // if you want to use a different Application Delegate class from "AppDelegate" 12 | // you can specify it here. 13 | UIApplication.Main(args, null, typeof(AppDelegate)); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/Android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content.PM; 3 | using Android.OS; 4 | 5 | namespace PouBeLike; 6 | 7 | [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] 8 | public class MainActivity : MauiAppCompatActivity 9 | { 10 | } 11 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/MacCatalyst/Entitlements.Debug.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.apple.security.get-task-allow 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /PouBeLike/AppShell.xaml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/MacCatalyst/Entitlements.Release.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.apple.security.app-sandbox 7 | 8 | com.apple.security.network.client 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /PouBeLike/MauiProgram.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | 3 | namespace PouBeLike; 4 | 5 | public static class MauiProgram 6 | { 7 | public static MauiApp CreateMauiApp() 8 | { 9 | var builder = MauiApp.CreateBuilder(); 10 | builder 11 | .UseMauiApp() 12 | .ConfigureFonts(fonts => 13 | { 14 | fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); 15 | fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); 16 | }); 17 | 18 | #if DEBUG 19 | builder.Logging.AddDebug(); 20 | #endif 21 | 22 | return builder.Build(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /PouBeLike/App.xaml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /PouBeLike/Resources/Raw/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories). Deployment of the asset to your application 3 | is automatically handled by the following `MauiAsset` Build Action within your `.csproj`. 4 | 5 | 6 | 7 | These files will be deployed with you package and will be accessible using Essentials: 8 | 9 | async Task LoadMauiAsset() 10 | { 11 | using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt"); 12 | using var reader = new StreamReader(stream); 13 | 14 | var contents = reader.ReadToEnd(); 15 | } 16 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/Windows/app.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | true/PM 12 | PerMonitorV2, PerMonitor 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/Tizen/tizen-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | maui-appicon-placeholder 7 | 8 | 9 | 10 | 11 | http://tizen.org/privilege/internet 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/Windows/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml; 2 | 3 | // To learn more about WinUI, the WinUI project structure, 4 | // and more about our project templates, see: http://aka.ms/winui-project-info. 5 | 6 | namespace PouBeLike.WinUI; 7 | 8 | /// 9 | /// Provides application-specific behavior to supplement the default Application class. 10 | /// 11 | public partial class App : MauiWinUIApplication 12 | { 13 | /// 14 | /// Initializes the singleton application object. This is the first line of authored code 15 | /// executed, and as such is the logical equivalent of main() or WinMain(). 16 | /// 17 | public App() 18 | { 19 | this.InitializeComponent(); 20 | } 21 | 22 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LSRequiresIPhoneOS 6 | 7 | UIDeviceFamily 8 | 9 | 1 10 | 2 11 | 12 | UIRequiredDeviceCapabilities 13 | 14 | arm64 15 | 16 | UISupportedInterfaceOrientations 17 | 18 | UIInterfaceOrientationPortrait 19 | UIInterfaceOrientationLandscapeLeft 20 | UIInterfaceOrientationLandscapeRight 21 | 22 | UISupportedInterfaceOrientations~ipad 23 | 24 | UIInterfaceOrientationPortrait 25 | UIInterfaceOrientationPortraitUpsideDown 26 | UIInterfaceOrientationLandscapeLeft 27 | UIInterfaceOrientationLandscapeRight 28 | 29 | XSAppIconAssets 30 | Assets.xcassets/appicon.appiconset 31 | 32 | 33 | -------------------------------------------------------------------------------- /PouBeLike.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.5.002.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PouBeLike", "PouBeLike\PouBeLike.csproj", "{CBAB8241-A66B-40E4-B715-94A893FE840F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {CBAB8241-A66B-40E4-B715-94A893FE840F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {CBAB8241-A66B-40E4-B715-94A893FE840F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {CBAB8241-A66B-40E4-B715-94A893FE840F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {CBAB8241-A66B-40E4-B715-94A893FE840F}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {0F7459AE-727F-41E9-8FA3-A56477FA9DF4} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/MacCatalyst/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | UIDeviceFamily 15 | 16 | 2 17 | 18 | UIRequiredDeviceCapabilities 19 | 20 | arm64 21 | 22 | UISupportedInterfaceOrientations 23 | 24 | UIInterfaceOrientationPortrait 25 | UIInterfaceOrientationLandscapeLeft 26 | UIInterfaceOrientationLandscapeRight 27 | 28 | UISupportedInterfaceOrientations~ipad 29 | 30 | UIInterfaceOrientationPortrait 31 | UIInterfaceOrientationPortraitUpsideDown 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | XSAppIconAssets 36 | Assets.xcassets/appicon.appiconset 37 | 38 | 39 | -------------------------------------------------------------------------------- /PouBeLike/Resources/AppIcon/appiconfg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PouBeLike/Resources/Splash/splash.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PouBeLike/Platforms/Windows/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | $placeholder$ 15 | User Name 16 | $placeholder$.png 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /PouBeLike/Resources/Styles/Colors.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | #512BD4 10 | #DFD8F7 11 | #2B0B98 12 | White 13 | Black 14 | #E1E1E1 15 | #C8C8C8 16 | #ACACAC 17 | #919191 18 | #6E6E6E 19 | #404040 20 | #212121 21 | #141414 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | #F7B548 37 | #FFD590 38 | #FFE5B9 39 | #28C2D1 40 | #7BDDEF 41 | #C3F2F4 42 | #3E8EED 43 | #72ACF1 44 | #A7CBF6 45 | 46 | 47 | -------------------------------------------------------------------------------- /PouBeLike/Character.cs: -------------------------------------------------------------------------------- 1 | namespace PouBeLike; 2 | 3 | public class Character 4 | { 5 | double Sede; 6 | double Fome; 7 | double Felicidade; 8 | protected string FotoPersonagem; 9 | protected string TelaMorte; 10 | protected string NomePersonagem; 11 | protected bool AnimalMorto; 12 | 13 | //------------------------------------------------------------ 14 | 15 | public Character() 16 | { 17 | Sede = 0; 18 | Fome = 0; 19 | Felicidade = 0; 20 | AnimalMorto = false; 21 | } 22 | 23 | //------------------------------------------------------------ 24 | 25 | public void SetSede(double s) 26 | { 27 | if(s < 0) 28 | Sede = 0; 29 | 30 | else if(s > 1) 31 | Sede = 1; 32 | 33 | else 34 | Sede = s; 35 | } 36 | 37 | public void SetFome(double f) 38 | { 39 | if(f < 0) 40 | Fome = 0; 41 | 42 | else if (f > 1) 43 | Fome = 1; 44 | 45 | else 46 | Fome = f; 47 | } 48 | 49 | public void SetFelicidade(double fe) 50 | { 51 | if(fe < 0) 52 | Felicidade = 0; 53 | 54 | else if(fe > 1) 55 | Felicidade = 1; 56 | 57 | else 58 | Felicidade = fe; 59 | } 60 | 61 | //------------------------------------------------------------ 62 | 63 | public double GetSede() 64 | { 65 | return Sede; 66 | 67 | } 68 | 69 | public double GetFome() 70 | { 71 | return Fome; 72 | } 73 | 74 | public double GetFelicidade() 75 | { 76 | return Felicidade; 77 | } 78 | 79 | public bool GetAnimalMorto() 80 | { 81 | if(Sede <= 0.1 || Fome <= 0.1 || Felicidade <= 0.1) 82 | return true; 83 | 84 | else 85 | return false; 86 | } 87 | 88 | //------------------------------------------------------------ 89 | 90 | public string GetArquivo() 91 | { 92 | if(AnimalMorto == true) 93 | return TelaMorte; 94 | 95 | else 96 | return FotoPersonagem; 97 | } 98 | //------------------------------------------------------------ 99 | 100 | public string GetNomePersonagem() 101 | { 102 | return NomePersonagem; 103 | } 104 | 105 | //------------------------------------------------------------ 106 | } -------------------------------------------------------------------------------- /PouBeLike/PouBeLike.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0-android;net8.0-ios;net8.0-maccatalyst 5 | $(TargetFrameworks);net8.0-windows10.0.19041.0 6 | 7 | 8 | 9 | 14 | 15 | 16 | Exe 17 | PouBeLike 18 | true 19 | true 20 | enable 21 | 22 | 23 | PouBeLike 24 | 25 | 26 | com.companyname.poubelike 27 | 28 | 29 | 1.0 30 | 1 31 | 32 | 11.0 33 | 13.1 34 | 21.0 35 | 10.0.17763.0 36 | 10.0.17763.0 37 | 6.5 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 66 | 67 | Platforms/MacCatalyst/Entitlements.Debug.plist 68 | 69 | 70 | 71 | Platforms/MacCatalyst/Entitlements.Release.plist 72 | true 73 | 74 | 75 | -------------------------------------------------------------------------------- /PouBeLike/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Maui.Controls; 2 | using Windows.ApplicationModel.VoiceCommands; 3 | 4 | namespace PouBeLike; 5 | 6 | public partial class MainPage : ContentPage 7 | { 8 | IDispatcherTimer timer; 9 | Capybara SirCapivaldo; 10 | Orangotango Orengotengo; 11 | Duck Douglas; 12 | Character Atual; 13 | 14 | public MainPage() 15 | { 16 | InitializeComponent(); 17 | 18 | 19 | timer = Application.Current.Dispatcher.CreateTimer(); 20 | timer.Interval = TimeSpan.FromSeconds(1); 21 | timer.Tick += (s, e) => PassouTempo(); 22 | 23 | Iniciar(); 24 | 25 | } 26 | 27 | void Iniciar() 28 | { 29 | SirCapivaldo = new Capybara(); 30 | Orengotengo = new Orangotango(); 31 | Douglas = new Duck(); 32 | 33 | Atual = SirCapivaldo; 34 | ImagemAnimal.Source = Atual.GetArquivo(); 35 | LabelNome.Text = Atual.GetNomePersonagem(); 36 | 37 | SirCapivaldo.SetSede(0.5); 38 | SirCapivaldo.SetFome(0.5); 39 | SirCapivaldo.SetFelicidade(0.5); 40 | 41 | Orengotengo.SetSede(0.5); 42 | Orengotengo.SetFome(0.5); 43 | Orengotengo.SetFelicidade(0.5); 44 | 45 | Douglas.SetSede(0.5); 46 | Douglas.SetFome(0.5); 47 | Douglas.SetFelicidade(0.5); 48 | 49 | timer.Start(); 50 | } 51 | 52 | //------------------------------------------------------------ 53 | 54 | void ClicouBotaoReiniciar(object sender, EventArgs args) 55 | { 56 | SirCapivaldo = new Capybara(); 57 | Orengotengo = new Orangotango(); 58 | Douglas = new Duck(); 59 | 60 | FrameBarras.IsVisible = true; 61 | FrameInteracao.IsVisible = true; 62 | FrameMorte.IsVisible = false; 63 | LabelNome.Text = Atual.GetNomePersonagem(); 64 | ImagemAnimal.Source = Atual.GetArquivo(); 65 | 66 | Atual.SetSede(0.5); 67 | Atual.SetFome(0.5); 68 | Atual.SetFelicidade(0.5); 69 | 70 | Iniciar(); 71 | } 72 | 73 | //------------------------------------------------------------ 74 | 75 | void PassouTempo() 76 | { 77 | if(Atual.GetAnimalMorto()) 78 | { 79 | FrameBarras.IsVisible = false; 80 | FrameInteracao.IsVisible = false; 81 | FrameMorte.IsVisible= true; 82 | LabelNome.Text = ""; 83 | ImagemAnimal.Source = ""; 84 | timer.Stop(); 85 | 86 | } 87 | 88 | 89 | else 90 | { 91 | FrameBarras.IsVisible = true; 92 | FrameInteracao.IsVisible = true; 93 | FrameMorte.IsVisible = false; 94 | LabelNome.Text = Atual.GetNomePersonagem(); 95 | ImagemAnimal.Source = Atual.GetArquivo(); 96 | 97 | } 98 | 99 | 100 | 101 | 102 | SirCapivaldo.SetFome(SirCapivaldo.GetFome() - 0.01); 103 | SirCapivaldo.SetSede(SirCapivaldo.GetSede() - 0.0001); 104 | SirCapivaldo.SetFelicidade(SirCapivaldo.GetFelicidade() - 0.00001); 105 | 106 | Orengotengo.SetFome(Orengotengo.GetFome() - 0.01); 107 | Orengotengo.SetSede(Orengotengo.GetSede() - 0.0001); 108 | Orengotengo.SetFelicidade(Orengotengo.GetFelicidade() - 0.00001); 109 | 110 | Douglas.SetFome(Douglas.GetFome() - 0.01); 111 | Douglas.SetSede(Douglas.GetSede() - 0.0001); 112 | Douglas.SetFelicidade(Douglas.GetFelicidade() - 0.00001); 113 | 114 | 115 | BarraFome.Progress = Atual.GetFome(); 116 | BarraSede.Progress = Atual.GetSede(); 117 | BarraFelicidade.Progress = Atual.GetFelicidade(); 118 | } 119 | 120 | //------------------------------------------------------------ 121 | 122 | private void ClicouBotaoSetaDireita(object sender, EventArgs args) 123 | { 124 | if(Atual == SirCapivaldo) 125 | Atual = Orengotengo; 126 | 127 | else if(Atual == Orengotengo) 128 | Atual = Douglas; 129 | 130 | else if(Atual == Douglas) 131 | Atual = SirCapivaldo; 132 | 133 | 134 | 135 | ImagemAnimal.Source = Atual.GetArquivo(); 136 | LabelNome.Text = Atual.GetNomePersonagem(); 137 | 138 | } 139 | 140 | private void ClicouBotaoSetaEsquerda(object sender, EventArgs args) 141 | { 142 | if(Atual == SirCapivaldo) 143 | Atual = Douglas; 144 | 145 | else if(Atual == Douglas) 146 | Atual = Orengotengo; 147 | 148 | else if(Atual == Orengotengo) 149 | Atual = SirCapivaldo; 150 | 151 | ImagemAnimal.Source = Atual.GetArquivo(); 152 | LabelNome.Text = Atual.GetNomePersonagem(); 153 | BarraFome.Progress = Atual.GetFome(); 154 | BarraSede.Progress = Atual.GetSede(); 155 | BarraFelicidade.Progress = Atual.GetFelicidade(); 156 | } 157 | 158 | //------------------------------------------------------------ 159 | 160 | void AtualizarProgresso() 161 | { 162 | BarraFome.Progress = Atual.GetFome(); 163 | BarraSede.Progress = Atual.GetSede(); 164 | BarraFelicidade.Progress = Atual.GetFelicidade(); 165 | } 166 | 167 | //------------------------------------------------------------ 168 | 169 | private void ClicouBotaoComida(object sender, EventArgs args) 170 | { 171 | Atual.SetFome(Atual.GetFome() + 0.1); 172 | BarraFome.Progress = Atual.GetFome(); 173 | } 174 | 175 | //------------------------------------------------------------ 176 | 177 | private void ClicouBotaoAgua(object sender, EventArgs args) 178 | { 179 | Atual.SetSede(Atual.GetSede() + 0.1); 180 | BarraSede.Progress = Atual.GetSede(); 181 | } 182 | 183 | //------------------------------------------------------------ 184 | 185 | private void ClicouBotaoBrincar(object sender, EventArgs args) 186 | { 187 | Atual.SetFelicidade(Atual.GetFelicidade() + 0.1); 188 | BarraFelicidade.Progress = Atual.GetFelicidade(); 189 | 190 | } 191 | } 192 | 193 | -------------------------------------------------------------------------------- /PouBeLike/MainPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |