mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-10-09 00:26:11 +00:00
update
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { _decorator } from "cc";
|
||||
import GButtleBase from "./GButtleBase";
|
||||
import { SpriteFrame } from "cc";
|
||||
import { Sprite } from "cc";
|
||||
import { UITransform } from "cc";
|
||||
import { size } from "cc";
|
||||
import { Size } from "cc";
|
||||
import { v3 } from "cc";
|
||||
import { Vec2 } from "cc";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
export interface GButtleDefaultInfo{
|
||||
image:SpriteFrame;//子弹图片
|
||||
scale:number; //子弹大小
|
||||
start:Vec2; //子弹初始位置
|
||||
}
|
||||
|
||||
//默认子弹类
|
||||
@ccclass("GButtleDefault")
|
||||
export default class GButtleDefault extends GButtleBase<GButtleDefaultInfo>{
|
||||
|
||||
setData(info:GButtleDefaultInfo){
|
||||
this.node.layer = 1;
|
||||
this.node.addComponent(Sprite).spriteFrame = info.image;
|
||||
this.node.scale = v3(info.scale,info.scale,0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user