Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions src/spritekit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,18 @@ partial interface SKNode : NSCoding, NSCopying {
[Export ("attributeValues", ArgumentSemantic.Copy)]
NSDictionary<NSString, SKAttributeValue> AttributeValues { get; set; }

#if !XAMCORE_4_0
// [Obsolete ("Please use the subtype's method")]
[iOS (9,0),Mac(10,11)]
[Export ("valueForAttributeNamed:")]
[return: NullAllowed]
SKAttributeValue GetValue (string key);

// [Obsolete ("Please use the subtype's method")]
[iOS (9,0),Mac(10,11)]
[Export ("setValue:forAttributeNamed:")]
void SetValue (SKAttributeValue value, string key);
#endif

#if !WATCH
// Extensions from GameplayKit, inlined to avoid ugly static extension syntax
Expand Down Expand Up @@ -376,6 +380,17 @@ partial interface SKEffectNode : SKWarpable {
[NullAllowed] // by default this property is null
[Export ("shader", ArgumentSemantic.Retain)]
SKShader Shader { get; set; }

#if XAMCORE_4_0
[iOS (9,0), Mac(10,11)]
[Export ("valueForAttributeNamed:")]
[return: NullAllowed]
SKAttributeValue GetValue (string key);

[iOS (9,0), Mac(10,11)]
[Export ("setValue:forAttributeNamed:")]
void SetValue (SKAttributeValue value, string key);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we cannot remove the call from the base class (breaking change) there's no point in having additional code on the subclass when XAMCORE_4_0 is not defined.

#endif
}

delegate Vector3 SKFieldForceEvaluator (/* vector_float3 */ Vector4 position, /* vector_float3 */ Vector4 velocity, float /* float, not CGFloat */ mass, float /* float, not CGFloat */ charge, double time);
Expand Down Expand Up @@ -712,6 +727,17 @@ partial interface SKSpriteNode : SKWarpable {
[TV (10,0)]
[Export ("scaleToSize:")]
void ScaleTo (CGSize size);

#if XAMCORE_4_0
[iOS (9,0), Mac(10,11)]
[Export ("valueForAttributeNamed:")]
[return: NullAllowed]
SKAttributeValue GetValue (string key);

[iOS (9,0), Mac(10,11)]
[Export ("setValue:forAttributeNamed:")]
void SetValue (SKAttributeValue value, string key);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

#endif
}

[Watch (3,0)]
Expand Down Expand Up @@ -935,6 +961,17 @@ partial interface SKEmitterNode {
[iOS (9,0)][Mac (10,11, onlyOn64 : true)]
[Export ("particleRenderOrder", ArgumentSemantic.Assign)]
SKParticleRenderOrder ParticleRenderOrder { get; set; }

#if XAMCORE_4_0
[iOS (9,0), Mac(10,11)]
[Export ("valueForAttributeNamed:")]
[return: NullAllowed]
SKAttributeValue GetValue (string key);

[iOS (9,0), Mac(10,11)]
[Export ("setValue:forAttributeNamed:")]
void SetValue (SKAttributeValue value, string key);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

#endif
}

[Watch (3,0)]
Expand Down Expand Up @@ -1053,6 +1090,17 @@ partial interface SKShapeNode {
[iOS (8,0), Mac (10,10)]
[Export ("lineLength")]
nfloat LineLength { get; }

#if XAMCORE_4_0
[iOS (9,0), Mac(10,11)]
[Export ("valueForAttributeNamed:")]
[return: NullAllowed]
SKAttributeValue GetValue (string key);

[iOS (9,0), Mac(10,11)]
[Export ("setValue:forAttributeNamed:")]
void SetValue (SKAttributeValue value, string key);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

#endif
}

[Watch (3,0)]
Expand Down Expand Up @@ -2981,6 +3029,17 @@ interface SKTileMapNode : NSCopying, NSCoding
[Export ("tileMapNodesWithTileSet:columns:rows:tileSize:fromNoiseMap:tileTypeNoiseMapThresholds:")]
SKTileMapNode[] FromTileSet (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, GKNoiseMap noiseMap, NSNumber[] thresholds);
#endif

#if XAMCORE_4_0
[iOS (9,0), Mac(10,11)]
[Export ("valueForAttributeNamed:")]
[return: NullAllowed]
SKAttributeValue GetValue (string key);

[iOS (9,0), Mac(10,11)]
[Export ("setValue:forAttributeNamed:")]
void SetValue (SKAttributeValue value, string key);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

#endif
}

[Watch (3,0)]
Expand Down