Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Created March 16, 2015 05:39
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 anonymous/5d42c9e3418204176d0c to your computer and use it in GitHub Desktop.
Save anonymous/5d42c9e3418204176d0c to your computer and use it in GitHub Desktop.
#include "SpellWorld.h"
#include "RandomProjectile.h"
ARandomProjectile::ARandomProjectile(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
int min = 1;
int max = 5;
int randNum = rand() % max + min;
int randNum2 = rand() % 10000 + 10;
this->SetScale(FVector(randNum, randNum, randNum));
this->SetSpeed(randNum2);
//this->SetLifeSpan(randNum);
}
#pragma once
#include "SpellWorldProjectile.h"
#include "RandomProjectile.generated.h"
UCLASS(config = Game)
class ARandomProjectile : public ASpellWorldProjectile
{
public:
GENERATED_BODY()
//Constructor
ARandomProjectile(const FObjectInitializer& ObjectInitializer);
////Called when projectile hits something
//UFUNCTION()
//void OnHit(AActor* otherActor, UPrimitiveComponent* otherComp, FVector normalImpulse, const FHitResult& hit);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment