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 System.Collections; | |
using System.Collections.Generic; | |
public class WandController : MonoBehaviour | |
{ | |
private Valve.VR.EVRButtonId gripButton = Valve.VR.EVRButtonId.k_EButton_Grip; | |
private Valve.VR.EVRButtonId triggerButton = Valve.VR.EVRButtonId.k_EButton_SteamVR_Trigger; | |
private SteamVR_Controller.Device controller { get { return SteamVR_Controller.Input((int)trackedObj.index); } } |
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 System.Collections; | |
using System.Collections.Generic; | |
public class InteractibleItem : MonoBehaviour | |
{ | |
public Rigidbody Rigidbody; | |
public BoxCollider collider; | |
private bool currentlyInteracting; | |
public WandController attachedHand; |
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 Engine : MonoBehaviour { | |
[Range(100f, 1000f)] | |
public float Force; | |
[Range(10f, 20f)] | |
public float MaxSpeed; | |
public bool IsOn; |
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; | |
/** | |
* A ship contains a weapon system | |
* This system monitors all the available weapons on the ship and can turn them on or off | |
* */ | |
public class WeaponSystem : MonoBehaviour { |
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 Weapon : WeaponSystem { | |
/** | |
* Fobject stands for "Firing object" | |
* This can be a projectile like a laser and missile | |
* Or an other generic "non projectile" object like an EMP |
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; |
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
#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 "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
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; |
OlderNewer