1
0
mirror of https://github.com/Memorix101/UnityXNA/ synced 2024-12-30 15:25:35 +01:00

small improvements

This commit is contained in:
Memorix101 2023-04-20 01:05:02 +02:00
parent 602464fbc6
commit 3e78162361
3 changed files with 16 additions and 2 deletions

View File

@ -6,7 +6,7 @@ using Microsoft.Xna.Framework.Graphics;
namespace Microsoft.Xna.Framework
{
class GraphicsDeviceManager
public class GraphicsDeviceManager
{
private Game game;

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace Microsoft.Xna.Framework.Graphics
{
@ -33,7 +34,7 @@ namespace Microsoft.Xna.Framework.Graphics
internal void Clear(Color color)
{
Camera.main.backgroundColor = new UnityEngine.Color(color.R, color.G, color.B);
}
}
}

View File

@ -27,9 +27,22 @@ namespace Microsoft.Xna.Framework.Media
}
}
public static float Volume
{
get
{
return audioSource.volume;
}
set
{
audioSource.volume = value;
}
}
internal static void Play(Song song)
{
audioSource.clip = song.Clip;
audioSource.volume = Volume;
audioSource.Play();
}
}