26 lines
786 B
TypeScript
26 lines
786 B
TypeScript
// Content/Domains/Camera/BP_CameraZone.ts
|
|
|
|
import { Actor } from '/TypeScript/Engine/Actor.ts';
|
|
import type { TengriCameraConfig } from '/Source/TengriPlatformer/Domains/Camera/Config/TengriCameraConfig.ts';
|
|
import type { TengriCharacter } from '/Source/TengriPlatformer/Domains/Character/TengriCharacter.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;
|
|
}
|