title: What is the right way to access property from another class?
body: <p>I would like to access my map from walk method of my Enemy class. I'm guessing I could create an instance of GameScene, but that seems to be not a good idea.</p>
  
  <p>How else I could do that? </p>
  
  <p><strong>GameScene.m</strong></p>
  
  <pre><code>@interface GameScene : SKScene
  @property (nonatomic) Map *map;
  @end
  
  @implementation GameScene
  
  
  -(void)didMoveToView:(SKView *)view {
  
      // map
      self.map = [Map new];
      self.map.level = 1;
      [self.map generateMap];
      [self addChild:self.map];
  
      // enemy
      Enemy *enemy = [Enemy new];
      [self addChild:enemy];
  
  }
  </code></pre>
  
  <p><strong>Enemy.m</strong></p>
  
  <pre><code>#import "Enemy.h"
  
  @implementation Enemy
  
  -(instancetype) init{
    ...
  }
  
  
  -(void)walk{
      NSLog(@"enemy walk");   
  }
  
  @end
  </code></pre>