im trying to do a save system in my game and i made a box collider, checked is trigger and put it where i want to have the game save when the player touches it, but unity is complaining about public being inside OnTriggerEnter
heres the script
using UnityEngine;
using System.Collections;
public class Player : MonoBehaviour {
public int phone = 0;
public int monsterS = 1;
public int monsterH = 1;
public int monsterA = 1;
public int character = 0;
public int awake = 0;
public int time = 1;
void OnTriggerEnter(Collider other){
public void Save ()
{
SaveLoadManager.SavePlayer (this);
}
}
public void Load(){
int[] LoadedStats = SaveLoadManager.LoadPlayer ();
phone = LoadedStats[0];
monsterS = LoadedStats[1];
monsterH = LoadedStats[2];
monsterA = LoadedStats[3];
character = LoadedStats[4];
awake = LoadedStats[5];
time = LoadedStats [6];
}
}
i really dont know what to do at this point.