Example #1
0
 public FactoryManager()
 {
     factoryDict.Add(FactoryType.UIPanelFactory, new UIPanelFactory());
     factoryDict.Add(FactoryType.UIFactory, new UIFactory());
     factoryDict.Add(FactoryType.GameFactory, new GameFactory());
     audioClipFactory = new AudioClipFactory();
     spriteFactory    = new SpriteFactory();
     runtimeAnimatiorControllerFactory = new RuntimeAnimatiorControllerFactory();
 }
Example #2
0
 public FactoryManager()
 {
     // 实例化各工厂
     factoryDict.Add(FactoryType.UIPanel, new UIPanelFactory());
     factoryDict.Add(FactoryType.UI, new UIFactory());
     factoryDict.Add(FactoryType.GameObject, new GameFactory());
     audioClipFactory       = new AudioClipFactory();
     runtimeAnimatorFactory = new RuntimeAnimatorFactory();
     spriteFactory          = new SpriteFactory();
 }
Example #3
0
    public FactoryManager()
    {
        factoryDict.Add(FactoryType.GameFactory, new BaseFactory());
        factoryDict.Add(FactoryType.Enemy, new BaseFactory());
        factoryDict.Add(FactoryType.BoomFactory, new BaseFactory());
        factoryDict.Add(FactoryType.IConScore, new BaseFactory());
        factoryDict.Add(FactoryType.DiamondScore, new BaseFactory());
        factoryDict.Add(FactoryType.Enemy_3, new BaseFactory());
        factoryDict.Add(FactoryType.BoomFactory_3, new BaseFactory());
        factoryDict.Add(FactoryType.Fire_3, new BaseFactory());
        factoryDict.Add(FactoryType.Fire_Boss, new BaseFactory());
        //Boss
        factoryDict.Add(FactoryType.Boss_Fire_1, new BaseFactory());
        factoryDict.Add(FactoryType.BossPrefab, new BaseFactory());

        factoryDict.Add(FactoryType.Bullet_2, new BaseFactory());
        factoryDict.Add(FactoryType.Bullet_3, new BaseFactory());
        audioClipFactory = new AudioClipFactory();
    }
Example #4
0
    /// <summary>
    ///     We'll use the Start method to configure our PixelVisionEngin and load a game.
    /// </summary>
    public virtual void Start()
    {
        // Pixel Vision 8 doesn't have a frame per second lock. It's up to the runner to
        // determine what that cap should be. Here we'll use Unity's Application.targetFrameRate
        // to lock it at 60 FPS.
        Application.targetFrameRate = 60;

        // By changing Unity's Cursor.visible property to false we'll be able to hide the mouse
        // while the game is running.
        Cursor.visible = false;

        // By setting the Texture2D filter mode to Point, we ensure that it will look crisp at any size.
        // Since the Texture will be scaled based on the resolution, we want it always to look pixel perfect.

        fileSystem     = new FileSystemService();
        displayTarget  = new DisplayTarget(rawImage, this);
        inputFactory   = new InputFactory((DisplayTarget)displayTarget);
        textureFactory = new TextureFactory(true);
//        colorFactory = new ColorFactory();
        audioClipFactory = new AudioClipFactory();

        runner = new Runner(textureFactory);
    }