I try to work on a Force based 2D ship game. I have Forces, that a stored in a Dictionary, for Jets on a ship. So I just have to say the name, the amplitude and let the engine do the acceleration/rotation.
由于我不得不将部队轮换到船舶的地方坐标处,然后才能适用,而只是轮换新部队,它还轮换了存放在停泊位的部队。 是什么原因导致部队四舍五入。
Force f1 = new Force();
f1 = Player.JetsDict["RearRight"];
f1.Position = Vector2.Transform(f1.Position, Matrix.CreateRotationZ(Player.Rotation));
虽然该法典剂量不会改变在字典中储存的症状(但我不想把它当作更长的时间使用,而且我有很多力量可以处理):
Force f1 = new Force();
f1.Position = Player.JetsDict["RearRight"].Position;
f1.Vector = Player.JetsDict["RearRight"].Vector;
f1.Position = Vector2.Transform(f1.Position, Matrix.CreateRotationZ(Player.Rotation));
?
Greg, Mad