In my project I mix SKView with standard NSView objects in 1 window. And now I trying to take some information from SKscene (mouseDown location) and show it in label near skview object. I tried to use global variables and assign value for it in skview method
-(void)mouseDown:(NSEvent *)theEvent{
CGPoint location = [theEvent locationInNode:(self)];
// location = (10, 15) - example
currentPointPosition = CGPointMake(location.x, location.y);
//currentPointPosition = (10, 15)
}
but when check it from nsbutton, like this:
- (IBAction) updateButton:(id)sender {
NSLog(@"currentPoint over skview methods:
%0.3f : %0.3f", currentPointPosition.x, currentPointPosition.y);
//currentPointPosition = (0, 0)
//other code
}
...it remain like after init (annul).
Is it even possible to mix these techs?
ps: sorry for my english
Project screen: http://s8.postimg.org/kdmu36h6d/2014_09_19_20_02_30.png