Added basics for projectile system
still needs hits on character
This commit is contained in:
34
Source/OpenConflict/Weapons/Projectiles/ProjectileBase.cpp
Normal file
34
Source/OpenConflict/Weapons/Projectiles/ProjectileBase.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "ProjectileBase.h"
|
||||
|
||||
// Sets default values
|
||||
AProjectileBase::AProjectileBase()
|
||||
{
|
||||
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
|
||||
PrimaryActorTick.bCanEverTick = true;
|
||||
|
||||
collision = CreateDefaultSubobject<USphereComponent>("Collision");
|
||||
RootComponent = collision;
|
||||
|
||||
projectileMesh = CreateDefaultSubobject<UStaticMeshComponent>("ProjectileMesh");
|
||||
projectileMesh->SetupAttachment(collision);
|
||||
|
||||
projectileMotion = CreateDefaultSubobject<UProjectileMovementComponent>("ProjectileMovementComponent");
|
||||
}
|
||||
|
||||
// Called when the game starts or when spawned
|
||||
void AProjectileBase::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
void AProjectileBase::Tick(float DeltaTime)
|
||||
{
|
||||
Super::Tick(DeltaTime);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user