我想通过使用扩展SKSpriteNode的类
在场景中显示图像public class ImageNode : SKSpriteNode
{
public override void TouchesBeganWithEvent(NSEvent theEvent)
{
base.TouchesBeganWithEvent(theEvent);
var point = theEvent.LocationInNode(this);
var touchNode = this.GetNodeAtPoint(point);
}
}
我将此课程称为SKScene
Image = new ImageNode();
Image.Size = new CGSize(20, 20);
但图片没有显示在屏幕上!