literally half of the game
This commit is contained in:
parent
1590b5faa6
commit
b842289076
77 changed files with 11904 additions and 72 deletions
19
Assets/Scripts/MapEntrance.cs
Normal file
19
Assets/Scripts/MapEntrance.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class MapEntrance : MonoBehaviour
|
||||
{
|
||||
public Map mapToEnter;
|
||||
public int exitIndex;
|
||||
|
||||
public void EnterMap()
|
||||
{
|
||||
LevelSwitcher.instance.LoadMap(mapToEnter, exitIndex);
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
//fade to black
|
||||
EnterMap();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue