// Use this for initialization void Start() { if (instance != null) { DestroyObject(this.gameObject); return; } instance = this; }
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 }, }; }