initial upload

This commit is contained in:
niko
2026-05-24 12:14:04 +02:00
parent 213ed4c965
commit 2526aab9c7
961 changed files with 457060 additions and 10 deletions
@@ -0,0 +1,93 @@
using System;
using UnityEngine;
[Serializable]
public class playerwalkingsound : MonoBehaviour
{
public AudioClip walkingsound;
public AnimationClip walkAnimation;
public virtual void Update()
{
Transform transform = GameObject.FindWithTag("Player").transform;
GetComponent<AudioSource>().clip = walkingsound;
GetComponent<AudioSource>().loop = true;
if (Input.GetKeyDown(KeyCode.W))
{
GetComponent<AudioSource>().Play();
GetComponent<AudioSource>().loop = true;
}
if (Input.GetKeyUp(KeyCode.W))
{
GetComponent<AudioSource>().Stop();
}
if (Input.GetKeyDown(KeyCode.S))
{
GetComponent<AudioSource>().Play();
GetComponent<AudioSource>().loop = true;
}
if (Input.GetKeyUp(KeyCode.S))
{
GetComponent<AudioSource>().Stop();
}
if (Input.GetKeyDown(KeyCode.A))
{
GetComponent<AudioSource>().Play();
GetComponent<AudioSource>().loop = true;
}
if (Input.GetKeyUp(KeyCode.A))
{
GetComponent<AudioSource>().Stop();
}
if (Input.GetKeyDown(KeyCode.D))
{
GetComponent<AudioSource>().Play();
GetComponent<AudioSource>().loop = true;
}
if (Input.GetKeyUp(KeyCode.D))
{
GetComponent<AudioSource>().Stop();
}
if (Input.GetKeyDown(KeyCode.UpArrow))
{
GetComponent<AudioSource>().Play();
GetComponent<AudioSource>().loop = true;
}
if (Input.GetKeyUp(KeyCode.UpArrow))
{
GetComponent<AudioSource>().Stop();
}
if (Input.GetKeyDown(KeyCode.DownArrow))
{
GetComponent<AudioSource>().Play();
GetComponent<AudioSource>().loop = true;
}
if (Input.GetKeyUp(KeyCode.DownArrow))
{
GetComponent<AudioSource>().Stop();
}
if (Input.GetKeyDown(KeyCode.LeftArrow))
{
GetComponent<AudioSource>().Play();
GetComponent<AudioSource>().loop = true;
}
if (Input.GetKeyUp(KeyCode.LeftArrow))
{
GetComponent<AudioSource>().Stop();
}
if (Input.GetKeyDown(KeyCode.RightArrow))
{
GetComponent<AudioSource>().Play();
GetComponent<AudioSource>().loop = true;
}
if (Input.GetKeyUp(KeyCode.RightArrow))
{
GetComponent<AudioSource>().Stop();
}
}
public virtual void Main()
{
}
}