Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesper Andersen authored and Jesper Andersen committed Mar 7, 2016
0 parents commit b1489e0
Show file tree
Hide file tree
Showing 154 changed files with 80,057 additions and 0 deletions.
Binary file added .vs/Viking Game/v14/.suo
Binary file not shown.
9 changes: 9 additions & 0 deletions Assets/Animations.meta

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

Binary file added Assets/Animations/Fireball_anim.anim
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Animations/Fireball_anim.anim.meta

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

Binary file added Assets/Animations/fireball.controller
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Animations/fireball.controller.meta

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

9 changes: 9 additions & 0 deletions Assets/Prefabs.meta

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

Binary file added Assets/Prefabs/fireball.prefab
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Prefabs/fireball.prefab.meta

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

9 changes: 9 additions & 0 deletions Assets/Scenes.meta

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

Binary file added Assets/Scenes/scene.unity
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Scenes/scene.unity.meta

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

9 changes: 9 additions & 0 deletions Assets/Scripts.meta

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

28 changes: 28 additions & 0 deletions Assets/Scripts/PlayerMovement.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using UnityEngine;
using System.Collections;

public class PlayerMovement : MonoBehaviour {

public GameObject weapon;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
if (Input.GetButtonDown("Fire1")) {
Vector3 shootDirection = Input.mousePosition;
shootDirection.z = 0.0f;
shootDirection = Camera.main.ScreenToWorldPoint(shootDirection);
shootDirection = shootDirection - transform.position;
//Debug.Log(shootDirection.x + " - " + shootDirection.y + " - " + shootDirection.z);
//transform.position += new Vector3(shootDirection.x, shootDirection.y);
GameObject bullet = (GameObject) Instantiate(weapon, transform.position, Quaternion.identity);

//Debug.Log(
}

}
}
12 changes: 12 additions & 0 deletions Assets/Scripts/PlayerMovement.cs.meta

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

31 changes: 31 additions & 0 deletions Assets/Scripts/Shot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using UnityEngine;
using System.Collections;
using System;

public class Shot : MonoBehaviour {

public float speed;
public float lifeTime = 1;
private float lifeBegun;

// Use this for initialization
void Start () {
lifeBegun = Time.time;
Debug.Log(transform.eulerAngles.z);
}

// Update is called once per frame
void Update () {
if (Time.time > (lifeBegun + lifeTime)) {
Destroy(gameObject);
} else {
float rot = transform.eulerAngles.z;
transform.position += new Vector3(-(float) Math.Sin(degreeToRadian(rot)) * speed * Time.deltaTime,
(float) Math.Cos(degreeToRadian(rot)) * speed * Time.deltaTime);
}
}

private float degreeToRadian(float degree) {
return (float) ((Math.PI / 180) * degree);
}
}
12 changes: 12 additions & 0 deletions Assets/Scripts/Shot.cs.meta

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

9 changes: 9 additions & 0 deletions Assets/Sprites.meta

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

Binary file added Assets/Sprites/fireball.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions Assets/Sprites/fireball.png.meta

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

Binary file added Assets/Sprites/hud_p1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions Assets/Sprites/hud_p1.png.meta

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

Binary file added Library/AnnotationManager
Binary file not shown.
1 change: 1 addition & 0 deletions Library/AssetImportState
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5;0;6;-1
Binary file added Library/AssetServerCacheV3
Binary file not shown.
Empty file added Library/BuildPlayer.prefs
Empty file.
Binary file added Library/BuildSettings.asset
Binary file not shown.
Binary file added Library/CurrentLayout.dwlt
Binary file not shown.
Binary file added Library/CurrentMaximizeLayout.dwlt
Binary file not shown.
Binary file added Library/EditorUserBuildSettings.asset
Binary file not shown.
Binary file added Library/EditorUserSettings.asset
Binary file not shown.
Binary file added Library/InspectorExpandedItems.asset
Binary file not shown.
4 changes: 4 additions & 0 deletions Library/LastSceneManagerSetup.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sceneSetups:
- path: Assets/Scenes/scene.unity
isLoaded: 1
isActive: 1
2 changes: 2 additions & 0 deletions Library/LibraryFormatVersion.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
unityRebuildLibraryVersion: 11
unityForwardCompatibleVersion: 40
Binary file added Library/MonoManager.asset
Binary file not shown.
Binary file added Library/ProjectSettings.asset
Binary file not shown.
Binary file added Library/ScriptAssemblies/Assembly-CSharp.dll
Binary file not shown.
Binary file added Library/ScriptAssemblies/Assembly-CSharp.dll.mdb
Binary file not shown.
2 changes: 2 additions & 0 deletions Library/ScriptAssemblies/BuiltinAssemblies.stamp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0000.56a2b01c.0000
0000.56a2b038.0000
Binary file added Library/ScriptMapper
Binary file not shown.
Binary file added Library/UnityAssemblies/UnityEditor.dll
Binary file not shown.
Loading

0 comments on commit b1489e0

Please sign in to comment.