Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fill out your copyright notice in the Description page of Project Settings.
- #pragma once
- #include "GameFramework/Actor.h"
- #include "Projectile.generated.h"
- UCLASS()
- class GAME_API AProjectile : public AActor
- {
- GENERATED_BODY()
- virtual void PostInitializeComponents() override;
- UFUNCTION()
- void OnImpact(const FHitResult& HitResult);
- public:
- UFUNCTION(BlueprintImplementableEvent, Category = "Projectile")
- void spawnDecal();
- UPROPERTY(EditDefaultsOnly, Category = WeaponStat)
- FString DamageType;
- UPROPERTY(EditDefaultsOnly, Category = Projectile)
- float ProjectileLife;
- UPROPERTY(EditDefaultsOnly, Category = Projectile)
- int32 ProjectileDamage;
- UPROPERTY(VisibleDefaultsOnly, Category = Projectile)
- UProjectileMovementComponent* MovementComp;
- UPROPERTY(VisibleDefaultsOnly, Category = Projectile)
- USphereComponent* CollisionComp;
- // Sets default values for this actor's properties
- AProjectile();
- FVector GetAdjustedAim();
- // Called when the game starts or when spawned
- virtual void BeginPlay() override;
- void InitVelocity(FVector& ShootDirection);
- // Called every frame
- virtual void Tick( float DeltaSeconds ) override;
- protected:
- virtual void PostNetReceiveVelocity(const FVector& NewVelocity) override;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement