public static StuffFactory getInstance() { if (instance == null) { instance = new StuffFactory(); } return(instance); }
// Use this for initialization void Awake() { SSDirector director = SSDirector.getInstance(); director.currentSceneController = this; patrolFactory = Singleton <PatrolFactory> .Instance; stuffFactory = Singleton <StuffFactory> .Instance; actionManager = gameObject.AddComponent <PatrolActionManager>() as PatrolActionManager; LoadResources(); mainCamera.GetComponent <CameraMan>().target = player; scoreController = Singleton <ScoreController> .Instance; }