quang cao hosting

Code game Ghép hình 3D Sliding Puzzle Game

Xem: 1968    Tải: 1   Thảo luận: 0   Mục: Flash template, Flash game   Lĩnh vực: Game - Giải trí

0 điểm   ( 7 đánh giá ) File đã được kiểm thử
Miễn Phí [megacode]code-game-ghep-hinh-3d-sliding.rar (0)
Tải miễn phí

Bạn cần phải Đăng nhập để tải file [megacode]code-game-ghep-hinh-3d-sliding.rar
Nếu bạn chưa có tài khoản thì Đăng ký miễn phí tại đây

Báo lỗi download   Báo vi phạm bản quyền

So let’s see how it is done. First we’ll take a closer look at the main class (SlidingPuzzle.as). To get things working we need to import the proper classes.

Prerequisites

  • You should be familiar with OOP concepts and AS3
  • Basic knowledge about Away3D (primitives, materials, cameras…)

The code (SlidingPuzzle.as)

So let’s see how it is done. First we’ll take a closer look at the main class (SlidingPuzzle.as). To get things working we need to import the proper classes.

package {

	import away3d.cameras.HoverCamera3D;
	import away3d.containers.View3D;

	import com.techlabs.puzzle.ControlPanel;
	import com.techlabs.puzzle.PuzzleBoard;
	import com.techlabs.puzzle.events.PuzzleEvent;
	import com.techlabs.puzzle.helpers.ImageSlicer;

	import flash.display.Bitmap;
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageQuality;
	import flash.display.StageScaleMode;

	import flash.events.Event;
	import flash.net.URLRequest;

Next we initialize the variables.

	public static var subdivisions:int = 4;

Subdivisions determine how the puzzle board and the image itself are divided into smaller pieces. The default value results in 16 pieces.

	public static var padding:int = 2;

Padding defines the gap between puzzle pieces.This gives our game a bit more realistic feel.

	public static var size:int = 500;

Size determines the physical dimensions of the puzzle board. The loaded image doesn’t have to be 500x500px but make sure it is not too small either. Bigger is better

Code game Ghép hình 3D Sliding Puzzle Game

Code game Ghép hình 3D Sliding Puzzle Game Đăng ngày 03-10-2013  So let’s see how it is done. First we’ll take a closer look at the main class (SlidingPuzzle.as). To get things working we need to import the proper classes. 5/10 1968

Thảo luận:

Để bình luận bạn phải đăng nhập thành viên.

File tương tự

Files cùng mục

 
File gợi ý cho bạn
File tải nhiều nhất
Megacode.vn - Thư viện mã nguồn chia sẻ, tải file cho cộng đồng
Copyright © 2013-2021. All rights reserved. Bản quyền thuộc VinaGon
Email: info@vinagon.com
Hotline: 086.924.3838