Update SurvivalIsland

This commit is contained in:
xixu-me committed 2025-03-14 11:12:44 +08:00
1 parent 388161e953
commit c697b9366d
63 files changed
+70 -17

No files matched your search

@@ -0,0 +1,17 @@
using UnityEngine;
using System.Collections;
public class Inventory : MonoBehaviour {
public static int charge = 0;
public AudioClip collectSound;
// Use this for initialization
void Start () {
charge = 0;
}
// Update is called once per frame
void Update () {
AudioSource.PlayClipAtPoint (collectSound, transform.position); charge++;
}
}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 633af9eff8317514cbc42b3dfa3ad8ca
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
@@ -0,0 +1,18 @@
using UnityEngine;
using System.Collections;
public class PowerCell : MonoBehaviour {
public float rotationSpeed = 100.0f;
// Update is called once per frame
void Update () {
transform.Rotate (new Vector3 (0, rotationSpeed * Time.deltaTime, 0));
}
void OnTriggerEnter(Collider col) {
if (col.gameObject.tag == "Player") {
col.gameObject.SendMessage ("CellPickup");
Destroy(gameObject);
}
}
}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0cce1119d2a80244884d4ac9ac4a7cf2
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData: