suck it unity collab

This commit is contained in:
LadyEbony 2020-08-21 22:41:26 -07:00
parent 2630db1920
commit dad44ef0cf
456 changed files with 1861 additions and 128 deletions

View file

@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SimpleAnimationLoop : MonoBehaviour {
private new SpriteRenderer renderer;
public Sprite[] sprites;
public float frameTime = 0.75f;
private void Awake() {
renderer = GetComponent<SpriteRenderer>();
}
private void Update() {
var frameindex = Mathf.FloorToInt(Time.time / frameTime);
renderer.sprite = sprites[frameindex % sprites.Length];
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8ab68913b04318744b5be4144a001b08
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,26 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SimpleScrollLoop : MonoBehaviour {
public float width = 8.75f;
public float speed = 1f;
private float value = 0f;
public Transform one, two;
private void Update() {
if (speed > 0) {
one.localPosition = new Vector3(value - width, 0f, 0f);
two.localPosition = new Vector3(value, 0f, 0f);
} else {
one.localPosition = new Vector3(value + width, 0f, 0f);
two.localPosition = new Vector3(value, 0f, 0f);
}
value += Time.deltaTime * speed;
value %= width;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 90fbb72b07a62ea448ce550144c094c6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: