Fast CIA Installation
ReSharp3DS SDK Update
- Input.IsAPressedOnce / IsBPressedOnce / etc.
- Graphics.DrawLine
- Graphics.DrawCircle
- Graphics.FillCircle
- Graphics.DrawSprite
- Graphics.DrawSprite(path, x, y, width, height)
- Math3DS.Clamp / Abs / Lerp
- Color.RGB + couleurs constantes
- Debug.Log / LogInt
- File.GetSize
- Directory.ListFiles
- Directory.ListFolders
- Runtime.Exit
- Runtime.Restart
- Runtime.GetVersion
- Runtime.GetFps
- App.Exists
- App.ReadText
- App.WriteText
- Audio.PauseMusic
- Audio.ResumeMusic
- Audio.SetMusicLoop
- Audio.PlaySfx
- UI.MessageBox
- UI.DrawButton
- UI.DrawProgressBar
Exemple
namespace ReSharp3DS
{
public class Program
{
static bool initialized = false;
static int x = 150;
static int y = 110;
static int lastSaveTime = 0;
public static void Main()
{
if (!initialized)
{
initialized = true;
Console.Clear();
Debug.Log("ReSharp3DS full API demo");
Debug.Log(Runtime.GetVersion());
Audio.Init();
Audio.SetSfxVolume(80);
Audio.SetMusicVolume(60);
x = Save.GetInt("last_x", x);
y = Save.GetInt("last_y", y);
}
x += Input.CirclePadX() / 25;
y -= Input.CirclePadY() / 25;
x = Math3DS.Clamp(x, 0, Screen.BottomWidth - 12);
y = Math3DS.Clamp(y, 0, Screen.BottomHeight - 12);
if (Touch.IsPressed())
{
x = Touch.X();
y = Touch.Y();
}
if (Input.IsAPressedOnce())
{
Audio.Beep(Notes.C5, 100);
}
if (Input.IsBPressedOnce())
{
Save.SetInt("last_x", x);
Save.SetInt("last_y", y);
lastSaveTime = Time.Milliseconds();
}
if (Input.IsStartPressedOnce())
{
Runtime.Exit();
}
Graphics.Clear(Color.Black);
Graphics.DrawText(8, 8, App.GetName(), Color.White);
Graphics.DrawText(8, 24, "FPS:", Color.Gray);
Graphics.DrawText(56, 24, Runtime.GetFps().ToString(), Color.Green);
Graphics.DrawLine(0, 220, 319, 220, Color.Blue);
Graphics.DrawCircle(x + 6, y + 6, 12, Color.Yellow);
Graphics.FillRect(x, y, 12, 12, Color.Green);
if (Time.Milliseconds() - lastSaveTime < 1500)
{
UI.DrawProgressBar(8, 200, 120, 10, 100, 100);
Graphics.DrawText(8, 184, "Saved", Color.White);
}
Graphics.Present();
Runtime.Yield();
}
}
}