OSDN Git Service

アイテムの実装
[h58pcdgame/GameScriptCoreLibrary.git] / www / corelib / classes / ItemClass.js
1 var ItemClass = function(ownerStage, args)
2 {
3         //args[imgName]
4         ItemClass.base.apply(this, arguments);
5         this.isPhantom = true;
6         
7 }.extend(StageObject, {
8         draw: function(x, y){
9
10         },
11         
12         //\83u\83\8d\83b\83N\82Ì\93\96\82½\82è\94»\92è\97Ì\88æ\82ð\95Ï\8dX\82·\82é\82½\82ß\82É\82Í\82±\82Ì\8aÖ\90\94\82ð\83I\81[\83o\81[\83\89\83C\83h\82·\82é
13         //\88ø\90\94\82É\82Í\81A\93\96\82½\82è\82ð\8am\82©\82ß\82é\97v\91f\82Ì\93\96\82½\82è\94»\92è\97Ì\88æ\82Ì 1:\8d\8fã\8b÷ 2: \89E\89º\8b÷\82Ì\8dÀ\95W\82ð\8ew\92è
14         //MovableStageObject.isCollided\82©\82ç\8cÄ\82Î\82ê\82é
15         isCollided: function(x1, y1, x2, y2){
16                 return x2 >= this.origin.x && x1 < this.origin.x + this.size.x && y2 >= this.origin.y && y1 < this.origin.y + this.size.y;
17         },
18         
19         itemAttacked : function(obj, obj_x, obj_y)
20         {
21                 //\82±\82Ì\8f\88\97\9d\82ð\8eq\83N\83\89\83X\82Å\8fã\8f\91\82«\82µ\82Ä\83A\83C\83e\83\80\82Ì\93®\8dì\82ð\92è\8b`\82·\82é
22                 //obj : \82±\82Ì\83A\83C\83e\83\80\82É\90G\82Á\82½\90l(MainCharacter\82È\82Ç)
23                 //obj_x : obj\82Ì\90G\82ê\82½\92¼\8cã\82Ìx\8dÀ\95W
24         }
25 });