mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 19:34:47 +00:00
31 lines
814 B
TypeScript
31 lines
814 B
TypeScript
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";
|
|
import { GData } from "../../../consts/GData";
|
|
const { ccclass, property } = _decorator;
|
|
|
|
export interface GButtleDefaultInfo{
|
|
image:SpriteFrame;//子弹图片
|
|
scale:number; //子弹大小
|
|
}
|
|
|
|
//默认子弹类
|
|
@ccclass("GButtleDefault")
|
|
export default class GButtleDefault extends GButtleBase<GButtleDefaultInfo>{
|
|
|
|
setData(info:GButtleDefaultInfo){
|
|
this.node.layer = GData.layer.World;
|
|
this.node.addComponent(Sprite).spriteFrame = info.image;
|
|
this.node.scale = v3(info.scale,info.scale,0);
|
|
}
|
|
|
|
}
|
|
|
|
|