Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的第一个问题是如果 C++:
pTexture.getSize().x
等于 C#(因为这对我来说没有结果):
pTexture.Size().X
第二个问题是关于 C++ 代码(如何在 SFML.net 这一行中编写)。
pImage.move(0,-1)
pImage 是 Sprite,pTexture 当然是 Texture。
在 SFML.NET 中,没有用于属性的 getter/setter 方法,因此为了获取/设置大小,您必须:
texture.Size = // ... myfunction(texture.Size);
由于没有 setter 方法,您必须+=在Position属性上使用来模拟该move方法。
+=
Position
move