Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera movement #36

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Assets/CameraMovement.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using UnityEngine;
using System.Collections;

public class CameraMovement : MonoBehaviour {

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

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

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

Binary file modified Assets/Prefabs/Combat Units/CombatBear.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Combat Units/CombatCaryons.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Combat Units/CombatPeggy.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Combat Units/CombatTeacup.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/World Units/WorldBearPlayer.prefab
Binary file not shown.
2 changes: 1 addition & 1 deletion Assets/Prefabs/World Units/WorldBearPlayer.prefab.meta

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

Binary file modified Assets/Scenes/World.unity
Binary file not shown.
28 changes: 28 additions & 0 deletions Assets/Scripts/CameraRunner.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using UnityEngine;
using System.Collections;

/// <summary>
/// Class for Camera to Follow Player
/// </summary>
/// Author: Aaron (GitHub: @aaronkarp123)
/// 2/16/2016
public class CameraRunner : MonoBehaviour {

/// <summary>
/// Character for camera to follow
/// </summary>
public Transform player;

/// <summary>
/// Vector to add an offset to the following motion (should default to 0)
/// </summary>
public Vector3 offset;

void start () {
}

void Update ()
{
transform.position = new Vector3 (player.position.x + offset.x, 0, offset.z); // Camera follows the player with specified offset position
}
}
12 changes: 12 additions & 0 deletions Assets/Scripts/CameraRunner.cs.meta

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

62 changes: 62 additions & 0 deletions Assets/Scripts/Combat/Attacks/BasicAttack.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
using UnityEngine;

/// <summary>
/// Basic Attack
/// </summary>
/// Author: Sarah (GitHub: @skim74)
/// 2/14/16 - Jordan (GitHub: @skorlir) - fixed properties and PerformAttack stub
/// Also add inherit from MonoBehaviour so can be used as Component
/// 2/14/16
public class BasicAttack : MonoBehaviour, IAttack {
/// <summary>
/// Private member infrastructure for properties
/// </summary>
private bool allowed;

/// <summary>
/// Does 1hp damage
/// </summary>
public float Damage {
get {
return 1f;
}
}
/// <summary>
/// Hits 100% of the time
/// </summary>
public float Accuracy {
get {
return 1f;
}
}

/// <summary>
/// Displays "Basic Attack" at name of attack
/// </summary>
public string DisplayName {
get {
return "Basic Attack";
}
}

/// <summary>
/// Property getter and setter for Allowed
/// </summary>
public bool Allowed {
get {
return allowed;
}
set {
allowed = value;
}
}

/// <summary>
/// Performs attack on target and returns change in health
/// </summary>
/// <param name="target">Unit to perform attack on</param>
public float PerformAttack (Unit target) {
// TODO(jordan): implement this
return 0;
}
}
12 changes: 12 additions & 0 deletions Assets/Scripts/Combat/Attacks/BasicAttack.cs.meta

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

22 changes: 10 additions & 12 deletions Assets/Scripts/Combat/Attacks/IAttack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,42 @@
/// Interface for Attack Components
/// </summary>
/// Author: Jordan (GitHub: @skorlir)
/// 2/14/16 - return from abs class to interface using properties
/// 2/13/16
abstract class IAttack {
interface IAttack {
/// <summary>
/// Amount of Damage an Attack will do
/// </summary>
public abstract float Damage {
float Damage {
get;
}

/// <summary>
/// The Accuracy of an Attack
/// </summary>
public abstract float Accuracy {
float Accuracy {
get;
}

/// <summary>
/// What should be displayed on-screen as the name of the Attack
/// </summary>
public abstract string DisplayName {
string DisplayName {
get;
}

/// <summary>
/// Whether the Attack is currently allowed in combat
/// </summary>
public bool Allowed = true;

/// <summary>
/// Set whether an Attack is currently allowed
/// </summary>
/// <param name="allowed">Value to set</param>
abstract public void SetAllowed (bool allowed);
bool Allowed {
get;
set;
}

/// <summary>
/// Perform the Attack
/// </summary>
/// <param name="target">Unit the Attack will be performed on</param>
/// <returns>The amount of damage done by the attack</returns>
abstract public float PerformAttack (Unit target);
float PerformAttack (Unit target);
}
1 change: 1 addition & 0 deletions Assets/Scripts/Combat/CombatController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/// Controller for the Combat Scene to figure out whose turn it is, etc.
/// </summary>
/// Author: Jordan (GitHub: @skorlir)
/// 2/14/16 - Implement EndScreen()
/// 2/13/16 - Add allies/enemies and reorganize
/// 2/10/16
public class CombatController : MonoBehaviour {
Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/Combat/CombatUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/// Controller for Combat UI that can be used to show a message
/// </summary>
/// Author: Jordan (GitHub: @skorlir)
/// 2/14/16 - Add EndScreen
/// 2/10/16
public class CombatUIController : MonoBehaviour {
/// <summary>
Expand Down
15 changes: 15 additions & 0 deletions Assets/Scripts/NewBehaviourScript.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using UnityEngine;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

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

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