chunk 1: core gameplay scripts scenes runtime assets

This commit is contained in:
2026-04-06 11:02:34 +03:00
parent fa0388bc79
commit 0d11a097d8
703 changed files with 2292651 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CharacterVFXManager : MonoBehaviour
{
public GameObject punchHitFXPrefab;
public GameObject kickHitFXPrefab;
//public ParticleSystem block_FX;
public GameObject blockFXPrefab;
// Start is called before the first frame update
public void playPunchEffect(GameObject fxLocation)
{
Vector3 hitFX_Pos = fxLocation.transform.position;
GameObject hitFX = Instantiate(punchHitFXPrefab, hitFX_Pos, Quaternion.identity);
StartCoroutine(destroyHitFX(hitFX));
}
public void playKickEffect(GameObject fxLocation)
{
Vector3 hitFX_Pos = fxLocation.transform.position;
GameObject hitFX = Instantiate(kickHitFXPrefab, hitFX_Pos, Quaternion.identity);
StartCoroutine(destroyHitFX(hitFX));
}
public void playBlockEffect(GameObject fxLocation)
{
Vector3 blockFX_Pos = fxLocation.transform.position;
GameObject blockFX = Instantiate(blockFXPrefab, blockFX_Pos, Quaternion.identity);
StartCoroutine(destroyHitFX(blockFX));
//block effect is destroyed by a script attached to it
//block_FX.Play();
}
//destroy instantiated prefab in 10 secs
IEnumerator destroyHitFX(GameObject hitFX)
{
yield return new WaitForSeconds(1f);
Destroy(hitFX);
}
}