OSDN Git Service

3ea519f5c96a5f783f0769ee2025d8f4e079c45c
[h58pcdgame/GameScriptCoreLibrary.git] / www / corelib / classes / ThrownItemClass.js
1 // args[0] : \83A\83C\83e\83\80\82ÌID (\97á: "015")
2
3 var ThrownItemClass = function(stage, args)
4 {
5         var imgName = args[0] + ".png";
6         
7         var th = this;
8         var callback = function(obj){
9                 ThrowItemClass.itemCatched.apply(th, [obj]);
10         };
11         
12         ThrownItemClass.base.apply(this, [imgName, callback]);
13         
14         //FreeItemClass\82Ì\90Ý\92è
15         this.times = 1;
16         this.isPhantom = true;
17         
18         // MovableStageObject\82Ì\82½\82ß\82Ì\8eÀ\91\95
19         MovableStageObjectClass.apply(this, [stage, []]);
20         
21 }.extend(FreeItemClass, {
22         itemCatched : function(obj){
23                 var item = new SelectWidgetItemClass(false, this.image);
24                 
25                 // ...
26                 
27         },
28         tick : function(){
29                 MovableStageObjectClass.prototype.tick.apply(this);
30         },
31         moveTo : function(x, y){
32                 MovableStageObjectClass.prototype.moveTo.apply(this, [x, y]);
33         },
34         canMoveTo : function(x, y){
35                 MovableStageObjectClass.prototype.canMoveTo.apply(this, [x, y]);
36         }
37 });