Esempio n. 1
0
 public static CrystalFactory getInstance()
 {
     if (instance == null)
     {
         instance = new CrystalFactory();
     }
     return(instance);
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        SSDirector director = SSDirector.getInstance();

        director.currentSceneController = this;
        patrolFactory  = Singleton <PatrolFactory> .Instance;
        crystalFactory = Singleton <CrystalFactory> .Instance;
        actionManager  = gameObject.AddComponent <PatrolActionManager>() as PatrolActionManager;
        LoadResources();
        mainCamera.GetComponent <CameraMan>().target = player;
        scoreController = Singleton <ScoreController> .Instance;
    }