I'm creating platformer with physics and have a problem (because of i can't find sample I wrote here)
I wanna create polygon body (rectangle has no problem) when I try to do it I have following error:
Program: Shaman v0.9.0.0
Modules: Graphic=OpenTK, Input=Windows, Audio=OpenTK, Video=, Physics=Farseer
Start Time: 2011-11-23 21:51:26
Platform: Windows, 3 CPU Cores, 32 bit (on 64 bit OS), Windows 7 v7601 Service Pack 1, Resolution: 1024, 768
User: GreatVV (GREATVVPC)
Program: Shaman v0.9.0.0
Modules: Graphic=OpenTK, Input=Windows, Audio=OpenTK, Video=, Physics=Farseer
Start Time: 2011-11-23 22:02:54
Platform: Windows, 3 CPU Cores, 32 bit (on 64 bit OS), Windows 7 v7601 Service Pack 1, Resolution: 1024, 768
User: GreatVV (GREATVVPC)
00.113 Warning: You have used no modules and no run code, there is nothing to do for this application. Please add some render code.
at Delta.Utilities.Log.Warning(System.String message)
at Delta.Engine.Application.GagdpQkbw7DN9vFsam8(System.Object )
at Delta.Engine.Application.Start()
D:\My Projects\Shaman\Shaman\Program.cs(26,13): at Shaman.Program.Main()
05.869 Warning: CreateInstance failed for 'Shaman.Game': Адресат вызова создал исключение.
System.InvalidCastException: Объект должен реализовывать интерфейс IConvertible. (sorry for russian: error about there is no implementation of IConvertible
в System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
в System.Convert.ChangeType(Object value, Type conversionType)
в Delta.Utilities.Helpers.ArrayHelper.SafeGet[KeyType,ValueType](Dictionary`2 dict, KeyType key)
в Delta.PhysicsEngines.Farseer.FarseerBody.CreateShape() в H:\Svalko\DeltaEngine0.9.1\PhysicsEngines\Farseer\FarseerBody.cs:строка 434
в Delta.PhysicsEngines.Farseer.FarseerBody..ctor(FarseerPhysics physicsManager, PhysicsShape shape, Vector initialPosition) в H:\Svalko\DeltaEngine0.9.1\PhysicsEngines\Farseer\FarseerBody.cs:строка 262
в Delta.PhysicsEngines.Farseer.FarseerPhysics.CreateBody(Boolean is2D, PhysicsShape shape, Vector initialPosition) в H:\Svalko\DeltaEngine0.9.1\PhysicsEngines\Farseer\FarseerPhysics.cs:строка 149
в Delta.PhysicsEngines.Physics.lN4BuYSMr0JWeBhK5ga(Object , Boolean is2DBody, Object , Vector initialPosition)
в Delta.PhysicsEngines.Physics.Create2DBody(PhysicsShape shape, Point initialPosition)
в Delta.PhysicsEngines.Physics.CreatePolygon(Point initialPosition, IList`1 vertices, Single density)
в Shaman.GameModel.Objects.PlayerUnit.CreatePhysicsBody() в D:\My Projects\Shaman\Shaman\GameModel\Objects\PlayerUnit.cs:строка 23
в Shaman.GameObject..ctor(Rectangle boundsInMeters, GameWorld gameWorld) в D:\My Projects\Shaman\Shaman\GameModel\GameObject.cs:строка 45
в Shaman.GameModel.Objects.Unit..ctor(Rectangle boundsInMeters, GameWorld gameWorld) в D:\My Projects\Shaman\Shaman\GameModel\Objects\Unit.cs:строка 7
в Shaman.GameModel.Objects.PlayerUnit..ctor(Rectangle boundsInMeters, GameWorld gameWorld) в D:\My Projects\Shaman\Shaman\GameModel\Objects\PlayerUnit.cs:строка 11
в Shaman.Game..ctor() в D:\My Projects\Shaman\Shaman\Game.cs:строка 75
at Delta.Utilities.Log.Warning(System.String message)
at Delta.Engine.Dynamic.Factory.HKAF8tOqV5hTKqW9fx(System.Object )
at Delta.Engine.Dynamic.Factory.Create(System.Type classToCreate, System.Object argument)
at Delta.Engine.Dynamic.Factory.Create()
at Delta.Engine.Application.get_Instance()
at Delta.Engine.Application.Ca61Bxk8ucDr6GpPI7L()
at Delta.Engine.Application.Start()
D:\My Projects\Shaman\Shaman\Program.cs(26,13): at Shaman.Program.Main()
06.123 Error: Fatal Error: Unhandled exception occurred (Application is terminated, we cannot recover!): System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
в Delta.Engine.Application.T0uMvYkQfvK6NOkYobx(Object )
в Delta.Engine.Application.Start()
в Shaman.Program.Main() в D:\My Projects\Shaman\Shaman\Program.cs:строка 26
в System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
в System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
в Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
в System.Threading.ThreadHelper.ThreadStart_Context(Object state)
в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
в System.Threading.ThreadHelper.ThreadStart()
at Delta.Utilities.Log.Warning(System.String message)
at Delta.Engine.Application.Error(System.String message, System.Object exceptionObject)
at Delta.Engine.Application.vHtyIkkwbQ2GjSOLMV3(System.Object , System.Object )
at Delta.Engine.Application.HandleUnhandledException(System.Object sender, System.UnhandledExceptionEventArgs ex)
at Delta.Engine.Application.T0uMvYkQfvK6NOkYobx(System.Object )
at Delta.Engine.Application.Start()
D:\My Projects\Shaman\Shaman\Program.cs(26,13): at Shaman.Program.Main()