Visual Studio 2013과 통합 된 MonoGame과 MonoGame을 사용하여 게임과 같은 달 착륙을 시도하고 있으며, 최종 목표는 Windows 8.1 전화에서이 앱을 실행하는 것입니다. 몇 가지 오류가 발생했습니다. 아래는 대부분의 문제를 일으키는 코드입니다.MonoGame Phone Testing Errors
public class GameStart : Game
{
...
}
내가 점점 오전 오류가
Error 1 Missing partial modifier on declaration of type 'GameName1.GameStart'; another partial declaration of this type exists C:\Users\Matthew\Documents\Visual Studio 2013\Projects\GameName1\GameName1\GamePage.xaml.cs
UPDATE
public GameStart()
{
_graphics = new GraphicsDeviceManager(this);
_graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft|DisplayOrientation.LandscapeRight;
_graphics.IsFullScreen = true;
Content.RootDirectory = "Content";
//if (_motion.IsDataValid) //gonna get an error
//{
_motion = new Motion();
//}
// Frame rate is 30 fps by default for Windows Phone.
TargetElapsedTime = TimeSpan.FromTicks(333333);
// Extend battery life under lock.
InactiveSleepTime = TimeSpan.FromSeconds(1);
_CurrentState = GameState.Active;
}
유형이다 : 나는 데 오류의
하나는은 Game1.cs 파일에 'GameName1.GameStart'는 이미 'GameStart'라는 멤버를 sa로 정의합니다. me 매개 변수 유형 C : \ Users \ Matthew \ Documents \ Visual Studio 2013 \ Projects \ GameName1 \ GameName1 \ Game1.cs
다음은이 오류 메시지가 참조하는 두 클래스입니다.
public GameStart()
{
InitializeComponent();
_game = XamlGame<Game>.Create("", this);
// Sample code to localize the ApplicationBar
//BuildLocalizedApplicationBar();
}
피곤 XamlGame.Create 방법을 변경하면 ""대신 문자열을 취할 수 있으며이 코드가 자동으로 생성 된 보조 노트로 나에게 다른 오류, 했다
업데이트. 잘못된 표현 용어 '문자열'
:이 오류를 얻고있다
Error 3 The best overloaded method match for 'MonoGame.Framework.WindowsPhone.XamlGame.Create(string, Microsoft.Phone.Controls.PhoneApplicationPage)' has some invalid arguments C:\Users\Matthew\Documents\Visual Studio 2013\Projects\GameName1\GameName1\GamePage.xaml.cs
그러나
을 지금 :
public partial class GameStart : Game
{
private GameStart _game;
// Constructor
public GameStart()
{
InitializeComponent();
_game = XamlGame<Game>.Create(string , this);
// Sample code to localize the ApplicationBar
//BuildLocalizedApplicationBar();
}
} 내가 ""와 함께이 오류를 얻고 있었다 .
이 업데이트의 일부가 잘못되었습니다. '문자열'을 전달하는 것이 의미가 없습니다. ** 유형 **의 별칭입니다. 포인트는 변수이거나 값이어야합니다. 문자열이어야합니다. – kaveman