Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update animgraph template #49

Merged
merged 7 commits into from
Sep 18, 2021
4 changes: 2 additions & 2 deletions cocos/core/animation/newgen-anim/condition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class BinaryCondition implements Condition {
public static readonly Operator = BinaryOperator;

@serializable
public operator!: BinaryOperator;
public operator: BinaryOperator = BinaryOperator.EQUAL_TO;

@serializable
public lhs: BindableNumber = new BindableNumber();
Expand Down Expand Up @@ -137,7 +137,7 @@ export class UnaryCondition implements Condition {
public static readonly Operator = UnaryOperator;

@serializable
public operator!: UnaryOperator;
public operator: UnaryOperator = UnaryOperator.TRUTHY;

@serializable
public operand = new BindableBoolean();
Expand Down
19 changes: 4 additions & 15 deletions editor/assets/default_file_content/animgraph
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
},
{
"__type__": "cc.animation.PoseSubgraph",
"_bindings": {},
"name": "",
"onEnter": null,
"onExit": null,
"_components": [],
"_nodes": [
{
"__id__": 3
Expand All @@ -51,23 +49,14 @@
},
{
"__type__": "cc.animation.GraphNode",
"_bindings": {},
"name": "Entry",
"onEnter": null,
"onExit": null
"name": "Entry"
},
{
"__type__": "cc.animation.GraphNode",
"_bindings": {},
"name": "Exit",
"onEnter": null,
"onExit": null
"name": "Exit"
},
{
"__type__": "cc.animation.GraphNode",
"_bindings": {},
"name": "Any",
"onEnter": null,
"onExit": null
"name": "Any"
}
]