Example #1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         //DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
 private void Start()
 {
     movement = GetComponent <TopDownMovementScript>();
     anim     = GetComponent <Animator>();
 }