plantilla base para movimiento básico
This commit is contained in:
Robii Aragon
2026-02-05 05:07:55 -08:00
parent 195b696771
commit 779f2c8b20
14443 changed files with 23840465 additions and 452 deletions

View File

@@ -0,0 +1,48 @@
using System.Collections;
using System.Collections.Generic;
using GameKitController.Audio;
using UnityEngine;
public class projectileImpactSystem : MonoBehaviour
{
public AudioSource mainAudioSource;
public destroyGameObject mainDestroyGameObject;
public void activateImpactElements (Vector3 newPosition, AudioElement impactSoundEffect)
{
// print ("----Activate impact elements " + gameObject.activeSelf + " " + mainDestroyGameObject.destroyCoroutineActive);
transform.position = newPosition;
if (mainAudioSource != null) {
impactSoundEffect.audioSource = mainAudioSource;
}
// print (impactSoundEffect.length);
if (impactSoundEffect.clip != null) {
mainDestroyGameObject.setTimer (impactSoundEffect.clip.length + 0.2f);
}
if (gameObject.activeSelf) {
mainDestroyGameObject.checkToDestroyObjectInTime (false);
} else {
gameObject.SetActive (true);
}
GKC_Utils.checkAudioSourcePitch (mainAudioSource);
AudioPlayer.Play (impactSoundEffect, gameObject);
decalManager.setImpactSoundParent (transform);
}
public void changeDestroyForSetActiveFunction (bool state)
{
mainDestroyGameObject.changeDestroyForSetActiveFunction (state);
}
public void setSendObjectToPoolSystemToDisableState (bool state)
{
mainDestroyGameObject.setSendObjectToPoolSystemToDisableState (state);
}
}