mirror of
https://github.com/Memorix101/UnityXNA/
synced 2024-12-30 15:25:35 +01:00
small improvements
This commit is contained in:
parent
602464fbc6
commit
3e78162361
@ -6,7 +6,7 @@ using Microsoft.Xna.Framework.Graphics;
|
|||||||
|
|
||||||
namespace Microsoft.Xna.Framework
|
namespace Microsoft.Xna.Framework
|
||||||
{
|
{
|
||||||
class GraphicsDeviceManager
|
public class GraphicsDeviceManager
|
||||||
{
|
{
|
||||||
private Game game;
|
private Game game;
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Microsoft.Xna.Framework.Graphics
|
namespace Microsoft.Xna.Framework.Graphics
|
||||||
{
|
{
|
||||||
@ -33,7 +34,7 @@ namespace Microsoft.Xna.Framework.Graphics
|
|||||||
|
|
||||||
internal void Clear(Color color)
|
internal void Clear(Color color)
|
||||||
{
|
{
|
||||||
|
Camera.main.backgroundColor = new UnityEngine.Color(color.R, color.G, color.B);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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)
|
internal static void Play(Song song)
|
||||||
{
|
{
|
||||||
audioSource.clip = song.Clip;
|
audioSource.clip = song.Clip;
|
||||||
|
audioSource.volume = Volume;
|
||||||
audioSource.Play();
|
audioSource.Play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user