Skip to content

Commit

Permalink
Build 0.1
Browse files Browse the repository at this point in the history
Quick demo build
  • Loading branch information
Kelvoid committed Jan 16, 2017
1 parent c2abd1d commit 5a5d69d
Show file tree
Hide file tree
Showing 51 changed files with 22,197 additions and 15 deletions.
Binary file added Satellite/Assets/_Audio/Main.mixer
Binary file not shown.
8 changes: 8 additions & 0 deletions Satellite/Assets/_Audio/Main.mixer.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Satellite/Assets/_Scenes/Observatory.unity
Binary file not shown.
Binary file modified Satellite/Assets/_Scenes/TitleScreen.unity
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,47 @@ public class CameraMovement : MonoBehaviour {
internal Vector3 targetPos;
Vector3 defaultPos;

public Vector3 offset;

public float travelTime;

public bool isTraveling;
bool isLocked;

public GameManager gameManager;
internal GameManager gameManager;

void Start()
{
targetPos = transform.position;
gameManager = FindObjectOfType<GameManager>();
gameManager = FindObjectOfType<GameManager>();
}

void Update ()
{
if (Input.GetMouseButtonDown(0))
{
if (Input.GetMouseButtonDown(0) && gameManager.currentFocus != null)
{
targetPos = gameManager.currentFocus.transform.position;
StartCoroutine(TravelToLocation(targetPos, travelTime));
}

if(isLocked == true)
{

}
}

IEnumerator TravelToLocation(Vector3 target, float seconds)
public IEnumerator TravelToLocation(Vector3 target, float seconds)
{
float elapsedTime = 0;
Vector3 startingPos = transform.position;
while(elapsedTime < seconds)
{
transform.LookAt(target);
transform.position = Vector3.Lerp(startingPos, target, (elapsedTime / seconds));
transform.position = Vector3.Lerp(startingPos, target - offset, (elapsedTime / seconds));
elapsedTime += Time.deltaTime;
yield return new WaitForEndOfFrame();
}
transform.position = target;
}


}
File renamed without changes.
14 changes: 9 additions & 5 deletions Satellite/Assets/_Scripts/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public class GameManager : MonoBehaviour

void Start ()
{
Cursor.visible = false;
//Cursor.visible = false;
Cursor.lockState = CursorLockMode.Confined;
screenCenter = new Vector2(Screen.width * 0.5f, Screen.height * 0.5f);
cameraMovement = mainCamera.GetComponent<CameraMovement>();
//linkLine = FindObjectOfType<LinkLine>();
Expand All @@ -67,13 +68,13 @@ void Update ()
if (currentFocus != null && currentFocus.distanceFromCenter > focalRange)
{
currentFocus = null;
cameraMovement.targetPos = transform.position;
//cameraMovement.targetPos = transform.position;
}

if(currentFocus != null)
{
cameraMovement.targetPos = currentFocus.transform.position;
targetPosition = currentFocus.transform.position;
//targetPosition = currentFocus.transform.position;
}
//cale tweak - added a more indepth debug
Debug.Log("Current:" + (currentFocus==null?"null":currentFocus.name)+
Expand All @@ -83,8 +84,11 @@ void Update ()
{
//Instantiate<LinkLine>(linkLine.setPoints(selectionOne.transform.position, selectionTwo.transform.position));
//linkLine.setPoints(selectionOne.transform.position, selectionTwo.transform.position);//cale adv - you should spawn a new line here provided the two satalites dont already have one connecting them~
}
}
}

void StateManager()
{


}
}
46 changes: 46 additions & 0 deletions Satellite/Assets/_Scripts/InputManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class InputManager : MonoBehaviour {

public GameManager gameManager;

int screenWidth;
int screenHeight;

public GameObject reticle;

Vector3 mousePosition;
Camera mainCamera;

void Start ()
{
screenWidth = Screen.width;
screenHeight = Screen.height;

gameManager = GetComponent<GameManager>();
mainCamera = GetComponent<Camera>();
}

void Update ()
{
mousePosition = Input.mousePosition;
Ray ray = mainCamera.ScreenPointToRay(mousePosition);
Vector3 cameraTarget = new Vector3 (ray.direction.x,ray.direction.y,ray.direction.z);
Vector3 cameraRot = transform.rotation.eulerAngles;

gameObject.transform.LookAt(cameraTarget);


if (Input.GetMouseButtonDown(0))
{
Debug.Log("Left Click");
}

if (Input.GetMouseButtonDown(1))
{
Debug.Log("Right Click");
}
}
}
12 changes: 12 additions & 0 deletions Satellite/Assets/_Scripts/InputManager.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions Satellite/Assets/_Scripts/Satellite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
using UnityEngine;

[RequireComponent(typeof(TrailRenderer))]
[RequireComponent(typeof(MeshRenderer))]
[RequireComponent(typeof(Light))]

public class Satellite : MonoBehaviour {

public Color[] satelliteColors;
Color mainColor;

GameManager gameManager;
MeshRenderer satelliteMesh;
TrailRenderer satelliteTrail;
Light satelliteLight;

Expand All @@ -30,13 +33,11 @@ public class Satellite : MonoBehaviour {
internal float lightIntensity;
internal float blinkRate;

bool isConnected;

//Identifiers
public float idNumber;
public string idName;

GameManager gameManager;

internal float distanceFromCenter;

void Awake ()
Expand All @@ -47,6 +48,7 @@ void Awake ()
satelliteTrail = gameObject.GetComponent<TrailRenderer>();
satelliteLight = gameObject.GetComponent<Light>();
gameManager = FindObjectOfType<GameManager>();
satelliteMesh = FindObjectOfType<MeshRenderer>();
}

void Start()
Expand Down
File renamed without changes.
File renamed without changes.
Binary file added Satellite/Sateline_0.1.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Satellite/Sateline_0.1_Data/Managed/System.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Satellite/Sateline_0.1_Data/Managed/mscorlib.dll
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 5a5d69d

Please sign in to comment.