26 lines
753 B
TypeScript
26 lines
753 B
TypeScript
// Content/Camera/BP_CameraZone.ts
|
|
|
|
import { Actor } from '/Content/UE/Actor.ts';
|
|
import type { TengriCharacter } from '/Source/TengriPlatformer/Character/TengriCharacter.ts';
|
|
import type { TengriCameraConfig } from '/Source/TengriPlatformer/Camera/Core/TengriCameraConfig.ts';
|
|
|
|
export class BP_CameraZone extends Actor {
|
|
constructor(ZoneConfig: TengriCameraConfig) {
|
|
super();
|
|
|
|
this.ZoneConfig = ZoneConfig;
|
|
}
|
|
|
|
EventActorBeginOverlap(OtherActor: Actor): void {
|
|
(OtherActor as TengriCharacter).CameraManager.SetCameraConfig(
|
|
this.ZoneConfig
|
|
);
|
|
}
|
|
|
|
EventActorEndOverlap(OtherActor: Actor): void {
|
|
(OtherActor as TengriCharacter).CameraManager.SetCameraConfig();
|
|
}
|
|
|
|
private readonly ZoneConfig: TengriCameraConfig;
|
|
}
|