3 Commits
Author SHA1 Message Date
Panic_Attack4444 e5eafbe22a Upload files to "/" 2026-10-06 13:00:01 +01:00
Panic_Attack4444 2f320eda37 Upload files to "/" 2026-10-06 12:59:34 +01:00
Panic_Attack4444 96e678131e Piano (almost as heavy as your mum) 2026-10-06 12:57:53 +01:00
11 changed files with 128 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
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
@@ -0,0 +1,9 @@
ManifestFileVersion: 0
UnityVersion: 6000.1.17f1
CRC: 3151077677
HashAppended: 0
AssetBundleManifest:
AssetBundleInfos:
Info_0:
Name: items
Dependencies: {}
+4
View File
@@ -0,0 +1,4 @@
{
"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
@@ -0,0 +1,22 @@
{
"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
@@ -0,0 +1,34 @@
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
@@ -0,0 +1,8 @@
{
"modId": "piano",
"name": "Piano",
"version": "1.0.0",
"enabled": true,
"entryAssembly": "bin/Piano.dll",
"entryType": "Piano.PianoPlugin"
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

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