Posts

Showing posts with the label .NET

[GODOT] Animate camera depending on touch screen events (C#)

Image
If you develop a 2D game for mobile, like a RPG game seen from top (Zelda like for instance), and you want to navigate on your map just by dragging the screen, here is the simple way to implement it in GODOT. In your level scene you have to add a "Camera" Node and make it the current one: public override void _Ready() { // Ensure the camera is set as current Current = true; } Then create the associated Camera script (in this example in C#). You have to handle Godot input events to animate the camera. The events to manage are: - InputEventScreenTouch - InputEventScreenDrag The goal is to determinate the delta amount of  horizontal & vertical spaces that have been dragged by the user. You can see an example of handling these events in the following code snippet (camera script):  using Godot; using System; public partial class camera : Camera2D { private Vector2 _touchStartPosition = new Vector2(); private bool _isDragging = false; // Call

Understanding .NET Standard

Image
If as me, you don't really understand all subtleties between .NET Core and .NET Standard , I suggest you to have a look at the following article. It explains some history about .NET Framework and how .NET Standard is born. >>  Xamarin blog: A brief history of .NET Standard Which version to use ? For me, an important point to master for my own projects, is to know which platforms I can reach with a specific .NET Standard or .NET Core library. The following table illustrate the compatibility between each .NET implementation: For instance, - if you build a Xamarin Android v. 7.0 application, you could use versions 1.0 up to 1.6 .NET Standard librairies into your project - or if you have a .NET Standard v. 1.4 library, you could only build Android  v. 7.0  applications ( not v. 8.0) Intersting References about .NET Standard: Xamarin blog: A brief history of .NET Standard .NET Standard official website .NET Standard, table version video