I made the victory screen and it is victorious!

This commit is contained in:
Logic Monkey
2018-04-23 12:01:04 -04:00
parent d166265866
commit 82307432c0
24 changed files with 1397 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LerpToPosition : MonoBehaviour {
public float lerpSpeed = 1f;
public Transform destination;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
var p = transform.position;
p = Vector3.Lerp(p, destination.position, lerpSpeed * Time.deltaTime);
transform.position = p;
}
}
+13
View File
@@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: e694504c94cf8f044a74af6cd3ca0281
timeCreated: 1524494103
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+28
View File
@@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TriggerVictory : MonoBehaviour
{
void OnTriggerEnter2D(Collider2D collider)
{
var p = collider.gameObject.GetComponent<witchAnimate>();
if (p != null)
{
switch (p.el)
{
case witchAnimate.Element.fire:
changeVictoryCandyColor.spriteIndex = 0;
break;
case witchAnimate.Element.ice:
changeVictoryCandyColor.spriteIndex = 1;
break;
case witchAnimate.Element.wind:
changeVictoryCandyColor.spriteIndex = 2;
break;
}
Application.LoadLevel("Victory");
}
}
}
+13
View File
@@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 6731ff309fe12c34ca0cfffb2bb48706
timeCreated: 1524494860
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+22
View File
@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class changeVictoryCandyColor : MonoBehaviour {
public Sprite[] sprites;
public static int spriteIndex;
SpriteRenderer sr;
// Use this for initialization
void Start () {
sr = GetComponent<SpriteRenderer>();
sr.sprite = sprites[spriteIndex];
}
// Update is called once per frame
void Update () {
}
}
+13
View File
@@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 420f2965dbb743644b5fe26f28c23aa5
timeCreated: 1524494647
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: