1 Commits
Author SHA1 Message Date
zxq5 df356d6356 Update README.md 2026-10-06 12:57:13 +01:00
11 changed files with 0 additions and 128 deletions
-42
View File
@@ -1,42 +0,0 @@
using UnityEngine;
using System.Collections;
namespace Piano
{
public class PianoBehaviour : AnvilBehaviour
{
private AudioClip pianoClip;
public override void OnLoad()
{
pianoClip = AGDAPI.Audio.LoadClip("assets/pianodrop.mp3");
}
public override void OnUse(ItemUseContext ctx)
{
AGDAPI.Audio.PlayClip(pianoClip, ctx.Player);
ctx.StartCoroutine(TimedDrop(ctx));
}
private IEnumerator TimedDrop(ItemUseContext ctx)
{
float hoverTime = 2.5f;
float hoverHeight = 8f;
var thrown = ctx.SpawnThrownObject(suspend: true);
if (thrown == null)
yield break;
thrown.transform.position = ctx.Player.transform.position + Vector3.up * hoverHeight;
yield return new WaitForSeconds(hoverTime);
thrown.Release();
}
public override float GetImpactDamage()
{
return base.GetImpactDamage() * 2.0f;
}
}
}
BIN
View File
Binary file not shown.
-9
View File
@@ -1,9 +0,0 @@
ManifestFileVersion: 0
UnityVersion: 6000.1.17f1
CRC: 3151077677
HashAppended: 0
AssetBundleManifest:
AssetBundleInfos:
Info_0:
Name: items
Dependencies: {}
-4
View File
@@ -1,4 +0,0 @@
{
"example.piano/piano.title": "Piano",
"example.piano/piano.desc": "The Science Show! Pianos! Who's idea was this?"
}
BIN
View File
Binary file not shown.
-22
View File
@@ -1,22 +0,0 @@
{
"items": [
{
"id": "piano",
"title": "Piano",
"titleKey": "piano/piano.title",
"description": "Summons a falling piano - bigger damage, lower fire rate.",
"descriptionKey": "piano/piano.desc",
"iconPath": "assets/piano.png",
"basedOn": "Anvil",
"category": "Gun",
"pool": "Normal",
"spawnChanceMultiplier": 1,
"triggerRadius": 3.5,
"effectDuration": 4,
"prefabId": "held",
"pedestalPrefabId": "pedestal",
"thrownVisualPrefabId": "thrown",
"hideVanillaThrownMesh": true
}
]
}
-34
View File
@@ -1,34 +0,0 @@
ManifestFileVersion: 0
UnityVersion: 6000.1.17f1
CRC: 3627608075
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: 80ee5c21f9e30f82a83c953597a48257
TypeTreeHash:
serializedVersion: 2
Hash: 8b020484f3856250fa4d2d05c7bc1cea
IncrementalBuildHash:
serializedVersion: 2
Hash: ae7ae7068b4ded7243602e1cd31c236a
HashAppended: 0
ClassTypes:
- Class: 1
Script: {instanceID: 0}
- Class: 4
Script: {instanceID: 0}
- Class: 23
Script: {instanceID: 0}
- Class: 33
Script: {instanceID: 0}
- Class: 43
Script: {instanceID: 0}
- Class: 65
Script: {instanceID: 0}
SerializeReferenceClassIdentifiers: []
Assets:
- Assets/ItemPrefabs/ItemThrown.prefab
- Assets/ItemPrefabs/ItemPedestal.prefab
- Assets/ItemPrefabs/ItemHeld.prefab
- Assets/ItemPrefabs/ItemDrop.prefab
Dependencies: []
-8
View File
@@ -1,8 +0,0 @@
{
"modId": "piano",
"name": "Piano",
"version": "1.0.0",
"enabled": true,
"entryAssembly": "bin/Piano.dll",
"entryType": "Piano.PianoPlugin"
}
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 KiB

BIN
View File
Binary file not shown.
-9
View File
@@ -1,9 +0,0 @@
{
"collectionId": 1,
"bundles": ["bundles/items"],
"prefabs": [
{ "id": "held", "assetName": "PianoHeld", "spawnable": false },
{ "id": "pedestal", "assetName": "PianoPedestal", "spawnable": false },
{ "id": "thrown", "assetName": "PianoLaunched", "spawnable": false }
]
}