Files
cocos4/editor/assets/default_file_content/ts-animation-graph
T
黄森斌 5866b04333 V3.5.0 optimize ts templates (#10553)
* optimize ts templates

* modify ts template

* recover code, import Node from cc
2022-03-29 20:13:55 +08:00

51 lines
1.8 KiB
Plaintext

import { _decorator, Component, Node, animation } from "cc";
const { ccclass, property } = _decorator;
@ccclass("<%UnderscoreCaseClassName%>")
export class <%UnderscoreCaseClassName%> extends animation.StateMachineComponent {
/**
* Called right after a motion state is entered.
* @param controller The animation controller it within.
* @param motionStateStatus The status of the motion.
*/
public onMotionStateEnter (controller: animation.AnimationController, motionStateStatus: Readonly<animation.MotionStateStatus>): void {
// Can be overrode
}
/**
* Called when a motion state is about to exit.
* @param controller The animation controller it within.
* @param motionStateStatus The status of the motion.
*/
public onMotionStateExit (controller: animation.AnimationController, motionStateStatus: Readonly<animation.MotionStateStatus>): void {
// Can be overrode
}
/**
* Called when a motion state updated except for the first and last frame.
* @param controller The animation controller it within.
* @param motionStateStatus The status of the motion.
*/
public onMotionStateUpdate (controller: animation.AnimationController, motionStateStatus: Readonly<animation.MotionStateStatus>): void {
// Can be overrode
}
/**
* Called right after a state machine is entered.
* @param controller The animation controller it within.
*/
public onStateMachineEnter (controller: animation.AnimationController) {
// Can be overrode
}
/**
* Called right after a state machine is entered.
* @param controller The animation controller it within.
*/
public onStateMachineExit (controller: animation.AnimationController) {
// Can be overrode
}
}