Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,18 @@
DOTween and DOTween Pro are copyright (c) 2014 Daniele Giardini - Demigiant

// GET STARTED //////////////////////////////////////////////

- After importing a new DOTween update, select DOTween's Utility Panel from the Tools menu (if it doesn't open automatically) and press the "Setup DOTween..." button to set up additional features based on your Unity version.
- In your code, add "using DG.Tweening" to each class where you want to use DOTween.
- You're ready to tween. Check out the links below for full documentation and license info.


// LINKS ///////////////////////////////////////////////////////

DOTween website (documentation, examples, etc): http://dotween.demigiant.com
DOTween license: http://dotween.demigiant.com/license.php
DOTween repository (Google Code): https://code.google.com/p/dotween/

// NOTES //////////////////////////////////////////////////////

- DOTween's Utility Panel can be found under "Tools > DOTween Utility Panel" and also contains other useful options, plus a tab to set DOTween's preferences
@@ -0,0 +1,25 @@
using UnityEngine;
using System.Collections;

public class Drone : MonoBehaviour
{
public float bagStealAmount;
public float bagStealRate;
private float currentStealRate;

void Update ()
{
if(GetComponent<InterceptMotor>().intercepted)
{
if (currentStealRate < 0)
{
Bag.instance.modBagSize(bagStealAmount);
currentStealRate = bagStealRate;
}
else
{
currentStealRate -= Time.deltaTime;
}
}
}
}

This file was deleted.

@@ -0,0 +1,16 @@
using UnityEngine;
using System.Collections;

public class ObjectMotor : MonoBehaviour
{
public Vector3 direction;
public float speed;

private Rigidbody rigid;

void Start()
{
rigid = GetComponent<Rigidbody>();
rigid.velocity = direction * speed;
}
}
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,24 @@
using UnityEngine;
using System.Collections;
using DG.Tweening;
public class ScreenShake : MonoBehaviour
{
public float duration;
public float strength;
public int vibrato;
public float randomness;

public bool test;
void Update()
{
if(test)
{
shake();
test = false;
}
}
public void shake()
{
transform.DOShakePosition(duration, strength, vibrato, randomness);
}
}
@@ -5,13 +5,17 @@ public class AnimateTexture : MonoBehaviour
{
public int materialIndex = 0;
public Vector2 uvAnimationRate = new Vector2(1.0f, 0.0f);
public float slowDownRate;
private float baseRate;
public string textureName = "_MainTex";

private Vector2 uvOffset = Vector2.zero;
private Renderer render;

void Awake()
{
baseRate = uvAnimationRate.y;
uvAnimationRate.y = 0;
render = GetComponent<Renderer>();
}
void Update()
@@ -21,5 +25,16 @@ void Update()
{
render.material.SetTextureOffset(textureName, uvOffset);
}

if (BigDog.instance.currentState == BigDog.bigDogStates.fallen ||
BigDog.instance.currentState == BigDog.bigDogStates.immobile)
{
uvAnimationRate.y += slowDownRate;
}
else
{
uvAnimationRate.y -= slowDownRate;
}
uvAnimationRate.y = Mathf.Clamp(uvAnimationRate.y, baseRate, 0);
}
}
@@ -4,7 +4,6 @@
public class BigDog : MonoBehaviour
{
public float hostileInteractionDelay;

public string[] hostileTags;

public static BigDog instance
@@ -18,6 +17,16 @@ public IActionController[] actions
private set;
}

public enum bigDogStates
{
immobile,
prefire,
mobile,
fallen
}
public bigDogStates currentState;
public bool isMobile;
public bool begin = true;
void Awake()
{
initInstance();
@@ -41,7 +50,45 @@ void initActions()

void Update()
{
runStates();
}

void runStates()
{
switch(currentState)
{
case bigDogStates.immobile:
enableActions(false);
if(isMobile)
{
currentState = bigDogStates.mobile;
}
break;

case bigDogStates.prefire:
enableActions(false);
if(begin)
{
isMobile = true;
currentState = bigDogStates.mobile;
}
break;
case bigDogStates.mobile:
enableActions(true);
if(GetComponent<Motor>().hasFallen)
{
currentState = bigDogStates.fallen;
}
if(!isMobile)
{
currentState = bigDogStates.immobile;
}
break;
case bigDogStates.fallen:
enableActions(false);
GetComponent<Rigidbody>().velocity = Vector3.zero;
break;
}
}

void enableActions(bool enable)
@@ -7,25 +7,28 @@ public class InterceptMotor : MonoBehaviour
public float interceptFalloff;

public GameObject target;

public bool intercepted = false;
void Start()
{
target = BigDog.instance.gameObject;
}
void Update()
{
if(transform.position.y < 0)
if(transform.position.z < 0)
{
moveToIntercept();
}
else
{
intercepted = true;
}
}

void moveToIntercept()
{
Vector3 targetSpeed = Vector3.zero;
Vector3 speed = Vector3.up * interceptSpeed * Time.deltaTime;
Vector3 speed = Vector3.forward * interceptSpeed * Time.deltaTime;
transform.Translate(speed);
}

@@ -29,11 +29,21 @@ public bool enableActions
private float currentClearDelay;
public float leanInjection;

public float timeToFall;
public float canFallRange;
private float currentTimeToFall;
public bool hasFallen
{
get;
private set;
}

void Start()
{
rigid = GetComponent<Rigidbody>();
currentInput = new Controller();
enableActions = true;
currentTimeToFall = timeToFall;
}
void Update()
{
@@ -58,7 +68,6 @@ void Update()
leanInjection = 0;
}
}

}

void lean(float value)
@@ -71,25 +80,59 @@ void lean(float value)
currentLean = value * leanSpeed * Time.deltaTime;

Vector3 targetRot = new Vector3(0, 0, (currentLean + (ambientLean * currentDirection)) + leanInjection);
transform.Rotate(targetRot);

transform.Rotate(targetRot);
Vector3 eulers = transform.rotation.eulerAngles;

if (eulers.z < 180)
{
currentDirection = 1;
float zAng = Mathf.Clamp(eulers.z, 0, maxLean);
transform.rotation = Quaternion.Euler(eulers.x, eulers.y, zAng);
currentLeanAngle = zAng / maxLean;
currentDirection = 1;
if(zAng >= maxLean - canFallRange)
{
beginToFall(true);
}
else
{
beginToFall(false);
}
}
else if(eulers.z > 180)
{
currentDirection = -1;
float zAng = Mathf.Clamp(eulers.z, 360 - maxLean, 360);
transform.rotation = Quaternion.Euler(eulers.x, eulers.y, zAng);
currentLeanAngle = Mathf.Abs(360 - zAng) / maxLean;
currentDirection = -1;

if (zAng <= 360 - maxLean + canFallRange)
{
beginToFall(true);
}
else
{
beginToFall(false);
}
}
Vector3 moveVect = -Vector3.right * currentDirection * speed * currentLeanAngle * Time.deltaTime;
rigid.velocity = moveVect;
transform.position = Vector3.ClampMagnitude(transform.position, maxMoveDist);
}

void beginToFall(bool falling)
{
if(falling)
{
currentTimeToFall -= Time.deltaTime;
if(currentTimeToFall <= 0)
{
hasFallen = true;
}
}
else
{
currentTimeToFall = timeToFall;
}
}
}
@@ -0,0 +1,21 @@
using UnityEngine;
using System.Collections;

public class SecretPickup : MonoBehaviour
{
public float sizeIncrease;

void OnTriggerEnter(Collider hit)
{
if(hit.GetComponent<BigDog>())
{
Bag.instance.modBagSize(sizeIncrease);
deathEvent();
}
}

void deathEvent()
{
Destroy(gameObject);
}
}
@@ -0,0 +1,20 @@
using UnityEngine;
using System.Collections;

public class SolidHit : MonoBehaviour
{
public float hitForce;

void OnTriggerEnter(Collider hit)
{
Motor target = hit.GetComponent<Motor>();
if(target)
{
target.leanInjection = hitForce;
foreach (GameObject cam in GameObject.FindGameObjectsWithTag("MainCamera"))
{
cam.GetComponent<ScreenShake>().shake();
}
}
}
}
File renamed without changes.
@@ -0,0 +1,10 @@
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class StartMenu : MonoBehaviour
{
public void startGame()
{
SceneManager.LoadScene(1);
}
}
@@ -0,0 +1,21 @@
using UnityEngine;
using System.Collections;

public class Status : MonoBehaviour
{
public float health;

public void hostileInteraction(float damage)
{
health -= damage;
if(health <= 0)
{
deathEvent();
}
}

void deathEvent()
{
Destroy(gameObject);
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.