mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-09-11 08:17:01 +00:00
elevator yay
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlatformTrigger : Trigger
|
||||
{
|
||||
public GameObject platform;
|
||||
public override void Action()
|
||||
{
|
||||
platform.GetComponent<Platform>().isMoving = true;
|
||||
platform.GetComponent<Platform>().Activate();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 705c1491fdb252841a61a0ff750d556d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -13,10 +13,15 @@ public class Platform : MonoBehaviour
|
||||
{
|
||||
if(isMoving)
|
||||
{
|
||||
startPos = transform.position;
|
||||
StartCoroutine(LerpPosition(positionToMoveTo, length));
|
||||
Activate();
|
||||
}
|
||||
}
|
||||
|
||||
public void Activate() {
|
||||
startPos = transform.position;
|
||||
StartCoroutine(LerpPosition(positionToMoveTo, length));
|
||||
|
||||
}
|
||||
IEnumerator LerpPosition(Vector3 targetPosition, float duration)
|
||||
{
|
||||
float time = 0;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,17 +9,17 @@ EditorUserSettings:
|
||||
value: 22424703114646680e0b0227036c78111b1258192f2d28353e663032ebee7415e7e923a7f234362820
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-1:
|
||||
value: 22424703114646680e0b0227036c7c0219001c396c1c23233967083debf42d
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-2:
|
||||
value: 22424703114646680e0b0227036c78111b1258192f2d28353e662a32f6e52678cee220eceb742a323016f6
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-3:
|
||||
RecentlyUsedScenePath-2:
|
||||
value: 22424703114646680e0b0227036c78111b1258192f2d28353e663932f0eb7414e7f133e5a92f31352d1b
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-4:
|
||||
RecentlyUsedScenePath-3:
|
||||
value: 22424703114646680e0b0227036c78111b1258192f2d28353e662e23e7e53078cee220eceb742a323016f6
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-4:
|
||||
value: 22424703114646680e0b0227036c7c0219001c396c1c23233967083debf42d
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-5:
|
||||
value: 22424703114646680e0b0227036c78111b1258192f2d28353e663536ebe73c2cf1a71aecf13f33722c0ce6281d
|
||||
flags: 0
|
||||
|
||||
Reference in New Issue
Block a user