add ckg
plantilla base para movimiento básico
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class headExplodeExample : MonoBehaviour
|
||||
{
|
||||
public bool useTimeBullet = true;
|
||||
public float timeBulletDuration = 3;
|
||||
public float timeScale = 0.2f;
|
||||
|
||||
public Transform headTransform;
|
||||
|
||||
public void explode ()
|
||||
{
|
||||
// print ("function to explode head here");
|
||||
|
||||
if (useTimeBullet) {
|
||||
GKC_Utils.activateTimeBulletXSeconds (timeBulletDuration, timeScale);
|
||||
}
|
||||
|
||||
if (headTransform != null) {
|
||||
headTransform.localScale = Vector3.zero;
|
||||
}
|
||||
}
|
||||
|
||||
public void explodeBodyPart (Transform objectToExplode)
|
||||
{
|
||||
if (objectToExplode != null) {
|
||||
objectToExplode.localScale = Vector3.zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user