This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* FWorld data is a struct containing all the information about a world and it's setting | |
*/ | |
USTRUCT(BlueprintType) | |
struct FWorldData | |
{ | |
GENERATED_BODY() | |
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Level Data") | |
int ID; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ Script made by Levi Visser | |
#include "BaseGameInstance.h" | |
// Singleton-like accessor. I only use this as a workaround for PIE | |
// The GameInstance lifecycle is different in PIE | |
// In proper builds, this wouldn't be necessary | |
ULevelGenerationManager* UBaseGameInstance::LevelGenerationManager() | |
{ | |
return | |
IsValid(LevelGenerationManagerInstance) ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
/// <summary> | |
/// Zone data asset which can be created by the designer | |
/// </summary> | |
public class ZoneDataAsset | |
{ | |
[MenuItem("Assets/Create/Zone")] | |
public static void Create() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Director class | |
/// </summary> | |
class Director : MonoBehaviour { | |
private AbstractShipBuilder _shipBuilder; | |
public void SetShipBuilder(AbstractShipBuilder builder) | |
{ | |
_shipBuilder = builder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class ShipMovementComponent : MonoBehaviour { | |
private Vector3 cameraStartingPos; | |
private Vector3 crosshairScreenPos; | |
private Vector3 crosshairViewPos; | |
private Vector3 crosshairWorldPos; | |
private float maxHorizontalCamChange; | |
private float MaxRotationRoll = 70; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "TankAimingComponent.h" | |
#include "Engine/World.h" | |
#include "TankBarrel.h" | |
#include "TankTurret.h" | |
#include "Engine.h" // TODO find correct include -> included to solve error UGameplayStatics::SuggestProjectileVelocity | |
#include "Engine/StaticMesh.h" | |
// Sets default values for this component's properties | |
UTankAimingComponent::UTankAimingComponent() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "TankAIController.h" | |
#include "Engine.h" // TODO Find correct include included to fix error given at GetWord() | |
#include "BattleTank.h" | |
#include "TankAimingComponent.h" | |
#include "Tank.h" | |
void ATankAIController::BeginPlay() | |
{ | |
Super::BeginPlay(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Tank.h" | |
#include "Engine.h" | |
// Sets default values | |
ATank::ATank() | |
{ | |
// Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don't need it. | |
PrimaryActorTick.bCanEverTick = false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Projectile : MonoBehaviour, IDamageDealer<float> { | |
public float speed; | |
public float range = 100; | |
private Vector3 startPosition; |
NewerOlder