Skip to content

Instantly share code, notes, and snippets.

@Trainfire
Created March 24, 2019 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Trainfire/9e51ed752d94d4266f4bb84d04e7983c to your computer and use it in GitHub Desktop.
Save Trainfire/9e51ed752d94d4266f4bb84d04e7983c to your computer and use it in GitHub Desktop.
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Components/SphereComponent.h"
#include "SpaceRock.generated.h"
UCLASS()
class ASTEROID_API ASpaceRock : public AActor
{
GENERATED_BODY()
UFUNCTION()
void OnHit(UPrimitiveComponent* HitComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
public:
// Sets default values for this actor's properties
ASpaceRock();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UPROPERTY(EditAnywhere)
USphereComponent* MyCollisionComponent;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment