예제 #1
0
 // Use this for initialization
 void Start()
 {
     if (instance != null)
     {
         DestroyObject(this.gameObject);
         return;
     }
     instance = this;
 }
예제 #2
0
 void Awake()
 {
     if (sprite_manager.sm == null)
     {
         sprite_manager.sm = this;
     }
     player = new Dictionary <direction, Sprite>()
     {
         { direction.up, this.player_up },
         { direction.down, this.player_down },
         { direction.left, this.player_left },
         { direction.right, this.player_right },
         { direction.none, this.player_up },
     };
 }