1. Trang chủ
  2. » Công Nghệ Thông Tin

Learning XNA 3 0

508 1,1K 1

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 508
Dung lượng 5,76 MB

Nội dung

Learning XNA 3.0 Other resources from O’Reilly Related titles oreilly.com C# 3.0 in a Nutshell Coding4Fun Essential Silverlight Up-to-Date Learning ASP.NET 2.0 with AJAX Learning C# 3.0 Physics for Game Developers oreilly.com is more than a complete catalog of O’Reilly books You’ll also find links to news, events, articles, weblogs, sample chapters, and code examples oreillynet.com is the essential portal for developers interested in open and emerging technologies, including new platforms, programming languages, and operating systems Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries We specialize in documenting the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches Visit conferences.oreilly.com for our upcoming events Safari Bookshelf (safari.oreilly.com) is the premier online reference library for programmers and IT professionals Conduct searches across more than 1,000 books Subscribers can zero in on answers to time-critical questions in a matter of seconds Read the books on your Bookshelf from cover to cover or simply flip to the page you need Try it today for free Learning XNA 3.0 Aaron Reed Beijing • Cambridge • Farnham • Kưln • Sebastopol • Taipei • Tokyo Learning XNA 3.0 by Aaron Reed Copyright © 2009 Aaron Reed All rights reserved Printed in the United States of America Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O’Reilly books may be purchased for educational, business, or sales promotional use Online editions are also available for most titles (safari.oreilly.com) For more information, contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com Editors: John Osborn and Laurel Ruma Production Editor: Sumita Mukherji Copyeditor: Rachel Head Proofreader: Sumita Mukherji Indexer: John Bickelhaupt Cover Designer: Karen Montgomery Interior Designer: David Futato Illustrator: Robert Romano Printing History: November 2008: First Edition Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc Learning XNA 3.0, the image of a sea robin fish, and related trade dress are trademarks of O’Reilly Media, Inc .NET is a registered trademark of Microsoft Corporation Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and O’Reilly Media, Inc was aware of a trademark claim, the designations have been printed in caps or initial caps While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein This book uses RepKover™ a durable and flexible lay-flat binding , ISBN: 978-0-596-52195-0 [M] This book is dedicated to the most beautiful woman on earth (yeah, sorry guys that would be my wife, Stacy) and our children (Hayden, Bryson, Rylan, and Kaylee) Table of Contents Preface xiii Getting Started System Requirements Additional Resources Installation Creating Your First XNA Application What You Just Did Summary Test Your Knowledge: Quiz 2 Fun with Sprites A Look Behind the Scenes Game Development Versus Polling Modifying Your Game Adding a Sprite to Your Project Loading and Drawing Your Sprite Transparency and Other Options Layer Depth Let’s Move Animation Adjusting the Framerate Adjusting the Animation Speed What You Just Did Summary 11 14 15 18 21 25 28 30 35 36 38 38 vii Test Your Knowledge: Quiz Test Your Knowledge: Exercise 39 39 User Input and Collision Detection 40 More Sprites Keyboard Input Mouse Input Gamepad Input Keeping the Sprite in the Game Window Collision Detection What You Just Did Summary Test Your Knowledge: Quiz Test Your Knowledge: Exercise 40 43 45 47 50 50 55 56 56 57 Applying Some Object-Oriented Design 58 Designing Your Classes Creating a Sprite Class Creating a User-Controlled Sprite Class Creating an Automated Sprite Game Components Coding the SpriteManager Cleaning Up Making Them Move What You Just Did Summary Test Your Knowledge: Quiz Test Your Knowledge: Exercise 58 59 63 65 67 69 71 74 74 74 75 75 Sound Effects and Audio 76 Using XACT Implementing XACT Audio Files in Code Using the Simplified API for Sound and Audio Adding More Sound to Your Game What You Just Did Summary Test Your Knowledge: Quiz Test Your Knowledge: Exercise viii | Table of Contents 77 83 85 86 91 91 91 91 The difficult part will be in the FireShots method of the Game1 class, where you’ll need to add the code for multiple shots Here is one possible solution for that part of the problem: protected void FireShots(GameTime gameTime) { if (shotCountdown

Ngày đăng: 14/05/2014, 20:05

Xem thêm

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN