Browse Source

Started to implement title scene.

Magnets sparks on/off again
master
Joshua Reason 9 years ago
parent
commit
d5760a60c7
14 changed files with 63 additions and 2142 deletions
  1. BIN
      Experiment Files/Assignment2_Demo_Data/level0
  2. BIN
      Experiment Files/Assignment2_Demo_Data/mainData
  3. +0
    -2141
      Experiment Files/Assignment2_Demo_Data/output_log.txt
  4. BIN
      Experiment Files/Assignment2_Demo_Data/sharedassets0.assets
  5. BIN
      Experiment Files/Assignment2_Demo_Data/sharedassets0.resource
  6. BIN
      Experiment Files/Assignment2_Demo_Data/sharedassets1.assets
  7. BIN
      Experiment Files/Assignment2_Demo_Data/sharedassets1.resource
  8. +8
    -0
      unity_Project/Assets/Scripts/MagnetLaser.cs
  9. +42
    -0
      unity_Project/Assets/Scripts/menuController.cs
  10. +12
    -0
      unity_Project/Assets/Scripts/menuController.cs.meta
  11. BIN
      unity_Project/Assets/_Scenes/MainLevel.unity
  12. BIN
      unity_Project/Assets/_Scenes/TitleScreen.unity
  13. BIN
      unity_Project/ProjectSettings/EditorBuildSettings.asset
  14. +1
    -1
      unity_Project/ProjectSettings/ProjectVersion.txt

BIN
Experiment Files/Assignment2_Demo_Data/level0 View File


BIN
Experiment Files/Assignment2_Demo_Data/mainData View File


+ 0
- 2141
Experiment Files/Assignment2_Demo_Data/output_log.txt
File diff suppressed because it is too large
View File


BIN
Experiment Files/Assignment2_Demo_Data/sharedassets0.assets View File


BIN
Experiment Files/Assignment2_Demo_Data/sharedassets0.resource View File


BIN
Experiment Files/Assignment2_Demo_Data/sharedassets1.assets View File


BIN
Experiment Files/Assignment2_Demo_Data/sharedassets1.resource View File


+ 8
- 0
unity_Project/Assets/Scripts/MagnetLaser.cs View File

@ -9,12 +9,14 @@ public class MagnetLaser : MonoBehaviour {
public int segments;
public float randomSize;
private magnetGun gun;
private ParticleSystem[] sparks;
// Use this for initialization
void Start () {
gun = player.GetComponent<magnetGun> ();
lr = GetComponent<LineRenderer> ();
sparks = gun.GetComponentsInChildren<ParticleSystem>();
}
@ -25,6 +27,10 @@ public class MagnetLaser : MonoBehaviour {
void Update () {
if (gun.GravityTarget != null) {
sparks[0].enableEmission = true;
sparks[1].enableEmission = true;
lr.enabled = true;
lr.SetVertexCount(segments+1);
lr.SetPosition(0, rodstart.transform.position);
@ -48,6 +54,8 @@ public class MagnetLaser : MonoBehaviour {
} else {
lr.enabled = false;
sparks[0].enableEmission = false;
sparks[1].enableEmission = false;
}

+ 42
- 0
unity_Project/Assets/Scripts/menuController.cs View File

@ -0,0 +1,42 @@
using UnityEngine;
using System.Collections;
public class menuController : MonoBehaviour {
public GameObject settings;
public GameObject credits;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public void startNewGame(string level){
Application.LoadLevel (level);
}
public void exitGame(){
Application.Quit ();
}
public void openPanel(string Str_panel){
settings.SetActive (false);
credits.SetActive (false);
if (Str_panel == "settings")
settings.SetActive (true);
if (Str_panel == "credits")
credits.SetActive (true);
}
public void closePanel(){
openPanel ("None");
}
}

+ 12
- 0
unity_Project/Assets/Scripts/menuController.cs.meta View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f31a6e089b8e94145bbe133d3e91e181
timeCreated: 1444529877
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

BIN
unity_Project/Assets/_Scenes/MainLevel.unity View File


BIN
unity_Project/Assets/_Scenes/TitleScreen.unity View File


BIN
unity_Project/ProjectSettings/EditorBuildSettings.asset View File


+ 1
- 1
unity_Project/ProjectSettings/ProjectVersion.txt View File

@ -1,2 +1,2 @@
m_EditorVersion: 5.1.3f1
m_EditorVersion: 5.1.2f1
m_StandardAssetsVersion: 0

Loading…
Cancel
Save