public static ModeChoose getInstance() { if (modechoose == null) { modechoose = new ModeChoose(); } return(modechoose); }
public void startGame(bool PhysicMode) { if (PhysicMode) { ModeChoose.getInstance().setPhysic(); } else { ModeChoose.getInstance().unsetPhysic(); } Director.getInstance().LoadScene(1); }
void Awake() { Debug.Log("Awake"); Director director = Director.getInstance(); director.setFPS(60); director.currentSceneController = this; judgement = Judge.getInstance(); loadInitSetting(); this.gameObject.AddComponent <UserGUI>(); if (ModeChoose.getInstance().ifPhysic()) { if (this.gameObject.GetComponent <SSActionManager>() != null) { Destroy(this.gameObject.GetComponent <SSActionManager>()); } if (this.gameObject.GetComponent <PhysicActionManager>() == null) { actionManager = this.gameObject.AddComponent <PhysicActionManager>(); Debug.Log("new py"); } } else { if (this.gameObject.GetComponent <PhysicActionManager>() != null) { Destroy(this.gameObject.GetComponent <PhysicActionManager>()); } if (this.gameObject.GetComponent <SSActionManager>() == null) { actionManager = this.gameObject.AddComponent <SSActionManager>(); Debug.Log("new ss"); } } actionManager.setCallback(this); if (this.gameObject.GetComponent <checkClick>() == null) { this.gameObject.AddComponent <checkClick>(); } director.currentSceneController.LoadResources(); }