コード例 #1
0
ファイル: Program.cs プロジェクト: BoiseCodeWorks/BlockBusted
        static void Main(string[] args)
        {
            Store bb = new Store("Overland Location");

            VHS    topGun     = new VHS("Top Gun", "PG", 110);
            DVD    fernGulley = new DVD("Fern Gulley", "G", 76, false);
            Bluray titanic    = new Bluray("Titanic", "PG-13", 194, true);



            //NOTE VHS's are implicitly casted to Movie
            bb.AddMovie(topGun);
            bb.AddMovie(fernGulley);
            bb.AddMovie(titanic);

            Console.Clear();
            Console.WriteLine(@"
______ _            _    _               _            
| ___ \ |          | |  | |             | |           
| |_/ / | ___   ___| | _| |__  _   _ ___| |_ ___ _ __ 
| ___ \ |/ _ \ / __| |/ / '_ \| | | / __| __/ _ \ '__|
| |_/ / | (_) | (__|   <| |_) | |_| \__ \ ||  __/ |   
\____/|_|\___/ \___|_|\_\_.__/ \__,_|___/\__\___|_|

Available Movies: 
            ");
            bb.PrintMovies();

            System.Console.WriteLine(fernGulley);
        }
コード例 #2
0
        /// <summary> Called in constructor to setup store with movies</summary>
        private void Setup()
        {
            Store = new Store("211 NE Revere Ave, Bend, OR 97701", 5413859111);
            VHS jp = new VHS(true, "Jurassic Park", 147, Rating.PG13, new List <Genre>()
            {
                Genre.Thriller, Genre.SciFi
            });
            VHS pagemaster = new VHS(false, "The Pagemaster", 98, Rating.PG, new List <Genre>()
            {
                Genre.Action, Genre.Children
            });
            VHS lotr = new VHS(true, "The Lord of the Rings: The Fellowship of the Ring - Extended Edition", 228, Rating.PG13, new List <Genre>()
            {
                Genre.Action
            });

            DVD dieHard = new DVD(2, true, "Die Hard", 110, Rating.R, new List <Genre>()
            {
                Genre.Action
            });

            Store.AddMovie(new List <Movie>()
            {
                jp, pagemaster, lotr, dieHard
            });                                                                  //Implicit casting
        }
コード例 #3
0
        static void Main(string[] args)
        {
            IReproductores DVD     = new DVD(0, "DVD1");
            IReproductores VHS     = new VHS(1, "VHS1");
            IReproductores Netflix = new Netflix(3, "Netflix1");

            ICRUD <IReproductores> ListaReproductores = new CRUD();

            ListaReproductores.insertar(DVD);
            ListaReproductores.insertar(VHS);
            ListaReproductores.insertar(Netflix);

            ListaReproductores.buscar(0).play();
            ListaReproductores.buscar(0).fw();
            ListaReproductores.buscar(0).rw();
            ListaReproductores.buscar(0).stop();

            ListaReproductores.buscar(1).play();
            ListaReproductores.buscar(1).fw();
            ListaReproductores.buscar(1).rw();
            ListaReproductores.buscar(1).stop();

            ListaReproductores.buscar(2).play();
            ListaReproductores.buscar(2).fw();
            ListaReproductores.buscar(2).rw();
            ListaReproductores.buscar(2).stop();

            ListaReproductores.eliminar(0);

            ListaReproductores.eliminar(0);

            ListaReproductores.eliminar(0);


            IReproductores DVD1     = new DVD(0, "DVD2");
            IReproductores VHS1     = new VHS(1, "VHS2");
            IReproductores Netflix1 = new Netflix(3, "Netflix2");

            ListaReproductores.insertar(DVD1);
            ListaReproductores.insertar(VHS1);
            ListaReproductores.insertar(Netflix1);

            ListaReproductores.buscar(0).play();
            ListaReproductores.buscar(0).fw();
            ListaReproductores.buscar(0).rw();
            ListaReproductores.buscar(0).stop();

            ListaReproductores.buscar(1).play();
            ListaReproductores.buscar(1).fw();
            ListaReproductores.buscar(1).rw();
            ListaReproductores.buscar(1).stop();

            ListaReproductores.buscar(2).play();
            ListaReproductores.buscar(2).fw();
            ListaReproductores.buscar(2).rw();
            ListaReproductores.buscar(2).stop();

            Console.ReadKey();
        }
コード例 #4
0
ファイル: Trailer.cs プロジェクト: RudraNilBasu/GGJ2021
    IEnumerator ShowGameNameWhenNecessary()
    {
        yield return(new WaitForSeconds(50.0f));

        VHS.Stop();
        ELEKTRICITY.Stop();
        BlackScreen.SetActive(true);
        GameName.SetActive(true);
    }
コード例 #5
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            Video jp    = new VHS("Jurassic Park", Rating.PG13);
            Store boise = new Store("123 Main st");

            boise.AddVideo(jp);
            boise.AddVideo(new VHS("Titanic", Rating.PG13));
            boise.AddVideo(new DVD("Dude Where's My Car", Rating.R, false));

            VHS   sw4 = new VHS("Star Wars: A New Hope", Rating.PG);
            VHS   sw5 = new VHS("Star Wars: Empire Strikes Back", Rating.PG);
            Video sw6 = new VHS("Star Wars: Return of the Jedi", Rating.PG);

            List <Video> swSaga = new List <Video>()
            {
                sw4,
                sw5,
                sw6
            };

            Video[] lotr = new Video[] {
                new DVD("Fellowship of the Ring", Rating.PG13, true)
            };

            boise.AddVideo(swSaga);
            boise.AddVideo(lotr);

            boise.Merchandise.Add("swag", new List <string>()
            {
                "Blockbuster Hoodie", "keychain"
            });
            boise.Merchandise.Add("Food", new List <string>()
            {
                "PopCorn", "Soda"
            });


            System.Console.WriteLine(boise.VideoList());
        }