ios - Increasing an integer upon collision with an object. Swift -


i have code creates , prints score game, want score increase upon collision object. , despite best efforts, cannot seen figure out how it.

this code deals score:

import spritekit  public class score {     public let label = sklabelnode(fontnamed: "chalkduster")      private var currentscore = 0      public func setup (fontsize: cgfloat, x: cgfloat, y: cgfloat) {         label.fontsize = fontsize         label.position.x = x         label.position.y = y         setscore(currentscore)     }      public func setscore(value: int) {         currentscore = value         label.text = string(currentscore)     }      public func incrementscore(value: int) {         setscore(currentscore + value)     } } 


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -