38 lines
446 B
C#
38 lines
446 B
C#
using UnityEngine;
|
|
using System.IO;
|
|
|
|
public class Game {
|
|
|
|
void SetMainPlayer(Player p){
|
|
m_mainPlayer = p;
|
|
}
|
|
|
|
|
|
Player GetMainPlayer(){
|
|
return m_mainPlayer;
|
|
}
|
|
|
|
|
|
|
|
|
|
private static Game Get() {
|
|
lock(m_singlmutex) {
|
|
if(m_inst==null)
|
|
m_inst = new Game();
|
|
}
|
|
return m_inst;
|
|
}
|
|
private Game() {
|
|
|
|
}
|
|
|
|
|
|
private static Game m_inst = null;
|
|
private static object m_singlmutex = new Object();
|
|
|
|
|
|
private Player m_mainPlayer = null;
|
|
|
|
|
|
|
|
} |