Rename contact attacking
This commit is contained in:
parent
1927c922d7
commit
1b8f594ea2
@ -4,7 +4,7 @@ import { PhysicsDynamics } from "@Behavior/PhysicsDynamics";
|
|||||||
import { Brownian } from "@Behavior/Brownian";
|
import { Brownian } from "@Behavior/Brownian";
|
||||||
import { BoundaryConstraint } from "@Behavior/BoundaryConstraint";
|
import { BoundaryConstraint } from "@Behavior/BoundaryConstraint";
|
||||||
import { Tracking } from "@Behavior/Tracking";
|
import { Tracking } from "@Behavior/Tracking";
|
||||||
import { Attacking } from "@Behavior/Attacking";
|
import { ContactAttacking } from "@Behavior/ContactAttacking";
|
||||||
|
|
||||||
const AllBehaviors: IAnyBehaviorRecorder[] = [
|
const AllBehaviors: IAnyBehaviorRecorder[] = [
|
||||||
new BehaviorRecorder(Template),
|
new BehaviorRecorder(Template),
|
||||||
@ -12,7 +12,7 @@ const AllBehaviors: IAnyBehaviorRecorder[] = [
|
|||||||
new BehaviorRecorder(Brownian),
|
new BehaviorRecorder(Brownian),
|
||||||
new BehaviorRecorder(BoundaryConstraint),
|
new BehaviorRecorder(BoundaryConstraint),
|
||||||
new BehaviorRecorder(Tracking),
|
new BehaviorRecorder(Tracking),
|
||||||
new BehaviorRecorder(Attacking),
|
new BehaviorRecorder(ContactAttacking),
|
||||||
]
|
]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3,17 +3,17 @@ import { Group } from "@Model/Group";
|
|||||||
import { Individual } from "@Model/Individual";
|
import { Individual } from "@Model/Individual";
|
||||||
import { Model } from "@Model/Model";
|
import { Model } from "@Model/Model";
|
||||||
|
|
||||||
type IAttackingBehaviorParameter = {
|
type IContactAttackingBehaviorParameter = {
|
||||||
target: "CLG",
|
target: "CLG",
|
||||||
success: "number",
|
success: "number",
|
||||||
range: "number"
|
range: "number"
|
||||||
}
|
}
|
||||||
|
|
||||||
type IAttackingBehaviorEvent = {}
|
type IContactAttackingBehaviorEvent = {}
|
||||||
|
|
||||||
class Attacking extends Behavior<IAttackingBehaviorParameter, IAttackingBehaviorEvent> {
|
class ContactAttacking extends Behavior<IContactAttackingBehaviorParameter, IContactAttackingBehaviorEvent> {
|
||||||
|
|
||||||
public override behaviorId: string = "Attacking";
|
public override behaviorId: string = "ContactAttacking";
|
||||||
|
|
||||||
public override behaviorName: string = "$Title";
|
public override behaviorName: string = "$Title";
|
||||||
|
|
||||||
@ -54,8 +54,8 @@ class Attacking extends Behavior<IAttackingBehaviorParameter, IAttackingBehavior
|
|||||||
|
|
||||||
public override terms: Record<string, Record<string, string>> = {
|
public override terms: Record<string, Record<string, string>> = {
|
||||||
"$Title": {
|
"$Title": {
|
||||||
"ZH_CN": "攻击",
|
"ZH_CN": "接触攻击",
|
||||||
"EN_US": "Attacking"
|
"EN_US": "Contact Attacking"
|
||||||
},
|
},
|
||||||
"$Target": {
|
"$Target": {
|
||||||
"ZH_CN": "攻击目标",
|
"ZH_CN": "攻击目标",
|
||||||
@ -76,4 +76,4 @@ class Attacking extends Behavior<IAttackingBehaviorParameter, IAttackingBehavior
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Attacking };
|
export { ContactAttacking };
|
@ -131,8 +131,8 @@ class SimulatorWeb extends Component {
|
|||||||
tracking.name = "Tracking"; tracking.color = [80, 200, 250];
|
tracking.name = "Tracking"; tracking.color = [80, 200, 250];
|
||||||
tracking.parameter.target.picker = fishLabel;
|
tracking.parameter.target.picker = fishLabel;
|
||||||
|
|
||||||
let attacking = this.status.model.addBehavior(getBehaviorById("Attacking"));
|
let attacking = this.status.model.addBehavior(getBehaviorById("ContactAttacking"));
|
||||||
attacking.name = "Attacking"; attacking.color = [120, 100, 250];
|
attacking.name = "Contact Attacking"; attacking.color = [120, 100, 250];
|
||||||
attacking.parameter.target.picker = fishLabel;
|
attacking.parameter.target.picker = fishLabel;
|
||||||
|
|
||||||
fish1.addBehavior(dynamicFish);
|
fish1.addBehavior(dynamicFish);
|
||||||
|
Loading…
Reference in New Issue
Block a user