init git
This commit is contained in:
31
assets/FishSingle/fish/script/FishBase.ts
Normal file
31
assets/FishSingle/fish/script/FishBase.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { _decorator, Component, Tween, tween } from 'cc'
|
||||
const { ccclass, property } = _decorator
|
||||
|
||||
import { FishPathInfo } from '../../script/game/config/FishPathInfo'
|
||||
import FishManager from '../../script/game/manager/FishManager'
|
||||
import { FishInfo } from '../../script/game/config/FishInfo'
|
||||
|
||||
@ccclass('FishBase')
|
||||
export default class FishBase extends Component {
|
||||
public fishInfo: FishInfo
|
||||
public fishType: number = 1
|
||||
public blood: number = 1
|
||||
public fishPathInfo: FishPathInfo
|
||||
public isDead: boolean
|
||||
onLoad() {}
|
||||
start() {}
|
||||
public playDeadMv() {
|
||||
this.isDead = true
|
||||
this.scheduleOnce(() => {
|
||||
FishManager.instance.killFish(this)
|
||||
}, 1.5)
|
||||
tween(this.node)
|
||||
.repeatForever(tween().by(0.6, { angle: -360 }))
|
||||
.start()
|
||||
}
|
||||
onDisable() {
|
||||
//this.node.stopAllActions();
|
||||
Tween.stopAllByTarget(this.node)
|
||||
this.unscheduleAllCallbacks()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user