This repository has been archived on 2026-04-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Last-Ember/Scripts/Game Objects/Structures/Pedestal.cs
T
2019-03-08 09:54:14 +11:00

23 lines
579 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Structures {
public class Pedestal : MonoBehaviour {
public string name;
public SaveHandler SaveHandler { set; get; }
void OnCollisionEnter2D(Collision2D collision) {
if (collision.gameObject.tag == "Player") {
SaveFileManager.LoadedSaveSlot.currentLocation = name;
SaveHandler.saveMenuAvailable = true;
}
}
void OnCollisionExit2D(Collision2D collision) {
if (collision.gameObject.tag == "Player") {
SaveHandler.saveMenuAvailable = false;
}
}
}
}