Skip to content
Snippets Groups Projects
Commit 92be7ac4 authored by Vesa Lappalainen's avatar Vesa Lappalainen :bicyclist:
Browse files

Lumiukko

parent cb16e75f
No related branches found
No related tags found
No related merge requests found
// Otetaan käyttöön Jyväskylän yliopiston Jypeli-kirjasto
using Jypeli;
namespace Lumiukko;
/// @author Antti-Jussi Lakanen, Vesa Lappalainen
/// @version 12.1.2012
///
/// <summary>
/// Luokka, jossa harjoitellaan piirtämistä lisäämällä ympyröitä ruudulle
/// </summary>
public class Lumiukko : PhysicsGame
{
/// <summary>
/// Aliohjelmassa piirretään ja zoomataan kamera siten että
/// kenttä näkyy hyvin ruudulla.
/// </summary>
public override void Begin()
{
Camera.ZoomToLevel();
Level.Background.Color = Color.Black;
PhysicsObject p1 = new PhysicsObject(2 * 100.0, 2 * 100.0, Shape.Circle);
p1.Y = Level.Bottom + 200.0;
Add(p1);
PhysicsObject p2 = new PhysicsObject(2 * 50.0, 2 * 50.0, Shape.Circle);
p2.Y = p1.Y + 100 + 50;
Add(p2);
PhysicsObject p3 = new PhysicsObject(2 * 30.0, 2 * 30.0, Shape.Circle);
p3.Y = p2.Y + 50 + 30;
Add(p3);
}
}
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Jypeli.NET" Version="11.*" />
<PackageReference Include="Jypeli.FarseerPhysics.NET" Version="2.*" />
</ItemGroup>
</Project>
#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
#endregion
namespace Lumiukko
{
/// <summary>
/// The main class.
/// </summary>
public static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
using var game = new Lumiukko();
game.Run();
}
}
}
@echo off
SET ERRORLEVEL=
"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\csc" %* /nologo /reference:Jypeli.dll;"%XNAGSv4%References\Windows\x86\Microsoft.Xna.Framework.Game.dll";"%XNAGSv4%References\Windows\x86\Microsoft.Xna.Framework.dll" /platform:x86 /define:WINDOWS
if ERRORLEVEL 1 goto loppu
%~n1
:loppu
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment