Commit 524fe223 authored by Christopher Benes's avatar Christopher Benes
Browse files

Useless Scripts deleted

parent b9ef7338
......@@ -124,7 +124,6 @@ GameObject:
- component: {fileID: 74979459}
- component: {fileID: 74979458}
- component: {fileID: 74979457}
- component: {fileID: 74979456}
m_Layer: 9
m_Name: SpriteShape (13)
m_TagString: Untagged
......@@ -132,20 +131,6 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &74979456
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 74979455}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0571132ce629be469a095e772a94c88, type: 3}
m_Name:
m_EditorClassIdentifier:
dirX: 0
moveSpeed: 3
--- !u!68 &74979457
EdgeCollider2D:
m_ObjectHideFlags: 0
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MovingPlatform : MonoBehaviour
{
public float dirX, moveSpeed = 3;
bool moveRight = true;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if(transform.position.x > 4f)
{
moveRight = false;
}
if(transform.position.x < -4f)
{
moveRight = true;
}
if(moveRight)
{
transform.position = new Vector2(transform.position.x + moveSpeed * Time.deltaTime, transform.position.y);
}
else
{
transform.position = new Vector2(transform.position.x - moveSpeed * Time.deltaTime, transform.position.y);
}
}
}
fileFormatVersion: 2
guid: d0571132ce629be469a095e772a94c88
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMoveWithPlatform : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void OnTriggerStay(other:Collider)
{
if (other.gameObject.tag == "platform")
{
transform.parent = other.transform;
}
}
void OnTriggerExit(other:Collider)
{
if (other.gameObject.tag == "platform")
{
transform.parent = null;
}
}
}
fileFormatVersion: 2
guid: 2e0736b5a4fcf8f489fddd2d53920483
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment