74 lines
3.1 KiB
TypeScript
74 lines
3.1 KiB
TypeScript
// Source/TengriPlatformer/Character/TengriCharacter.ts
|
|
|
|
import { Pawn } from '/Content/UE/Pawn.ts';
|
|
import { CapsuleComponent } from '/Content/UE/CapsuleComponent.ts';
|
|
import { SkeletalMesh } from '/Content/UE/SkeletalMesh.ts';
|
|
import { ArrowComponent } from '/Content/UE/ArrowComponent.ts';
|
|
import { TengriMovementComponent } from '/Source/TengriPlatformer/Movement/TengriMovementComponent.ts';
|
|
import { InputAction } from '/Content/UE/InputAction.ts';
|
|
import { InputMappingContext } from '/Content/UE/InputMappingContext.ts';
|
|
import { SpringArmComponent } from '/Content/UE/SpringArmComponent.ts';
|
|
import { CameraComponent } from '/Content/UE/CameraComponent.ts';
|
|
import { TengriCameraComponent } from '/Source/TengriPlatformer/Camera/TengriCameraComponent.ts';
|
|
import { TengriCameraConfig } from '/Source/TengriPlatformer/Camera/Core/TengriCameraConfig.ts';
|
|
|
|
export class TengriCharacter extends Pawn {
|
|
constructor(AimingCameraConfig: TengriCameraConfig) {
|
|
super();
|
|
|
|
this.CapsuleComponent = new CapsuleComponent();
|
|
this.Mesh = new SkeletalMesh();
|
|
this.ArrowComponent = new ArrowComponent();
|
|
this.MovementComponent = new TengriMovementComponent();
|
|
this.SpringArmComponent = new SpringArmComponent();
|
|
this.CameraComponent = new CameraComponent();
|
|
this.CameraManager = new TengriCameraComponent();
|
|
|
|
this.AimingCameraConfig = AimingCameraConfig;
|
|
|
|
this.InteractAction = new InputAction();
|
|
this.ThrowAction = new InputAction();
|
|
this.AimAction = new InputAction();
|
|
this.ItemHeldMappingContext = new InputMappingContext();
|
|
}
|
|
|
|
// ========================================================================
|
|
// COMPONENTS
|
|
// ========================================================================
|
|
|
|
public CapsuleComponent: CapsuleComponent;
|
|
public Mesh: SkeletalMesh;
|
|
public ArrowComponent: ArrowComponent;
|
|
public MovementComponent: TengriMovementComponent;
|
|
public SpringArmComponent: SpringArmComponent;
|
|
public CameraComponent: CameraComponent;
|
|
public CameraManager: TengriCameraComponent;
|
|
|
|
// ========================================================================
|
|
// CAMERA CONFIGS
|
|
// ========================================================================
|
|
|
|
public AimingCameraConfig: TengriCameraConfig;
|
|
|
|
// ========================================================================
|
|
// INPUT CONFIG
|
|
// ========================================================================
|
|
|
|
public InteractAction: InputAction;
|
|
public ThrowAction: InputAction;
|
|
public AimAction: InputAction;
|
|
public ItemHeldMappingContext: InputMappingContext;
|
|
|
|
// ========================================================================
|
|
// INTERACTION API
|
|
// ========================================================================
|
|
|
|
public Interact(): void {}
|
|
public OnItemHeldInput(): void {}
|
|
|
|
// ========================================================================
|
|
// INTERACTION STATE
|
|
// ========================================================================
|
|
public bIsAiming: boolean = false;
|
|
}
|