This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using System.Linq; | |
/// This just exposes the Sorting Layer / Order in MeshRenderer since it's there | |
/// but not displayed in the inspector. Getting MeshRenderer to render in front | |
/// of a SpriteRenderer is pretty hard without this. | |
[CustomEditor(typeof(MeshRenderer))] | |
public class MeshRendererSortingEditor : Editor | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
// This is basically how the Super Metroid camera worked. Whichever direction you moved, the camera would | |
// move in the same direction a multiple of the player's speed. Once the center of the camera moved a | |
// certain distance from the player, the camera would lock on the player and move the same speed. Change | |
// movement direction, and the camera would once again move more quickly to catch up and place itself | |
// ahead of the player's movement. | |
// Super Metroid also had area limits and locked certain axes based on where you were. For instance, if |