Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Assets/JMO Assets.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Assets/JMO Assets/WarFX/Demo.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Assets/JMO Assets/WarFX/Demo/Assets.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions Assets/JMO Assets/WarFX/Demo/Assets/CFX_AutoStopLoopedEffect.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;

// Cartoon FX - (c) 2015 Jean Moreno
//
// Script handling looped effect in the Demo Scene, so that they eventually stop

[RequireComponent(typeof(ParticleSystem))]
public class CFX_AutoStopLoopedEffect : MonoBehaviour
{
public float effectDuration = 2.5f;
private float d;

void OnEnable()
{
d = effectDuration;
}

void Update()
{
if(d > 0)
{
d -= Time.deltaTime;
if(d <= 0)
{
this.GetComponent<ParticleSystem>().Stop(true);

CFX_Demo_Translate translation = this.gameObject.GetComponent<CFX_Demo_Translate>();
if(translation != null)
{
translation.enabled = false;
}
}
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Assets/JMO Assets/WarFX/Demo/Assets/CFX_Demo_RandomDir.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using UnityEngine;
using System.Collections;

public class CFX_Demo_RandomDir : MonoBehaviour
{
public Vector3 min = new Vector3(0,0,0);
public Vector3 max = new Vector3(0,360,0);

void Awake ()
{
this.transform.eulerAngles = new Vector3(Random.Range(min.x,max.x),Random.Range(min.y,max.y),Random.Range(min.z,max.z));
}

}
14 changes: 14 additions & 0 deletions Assets/JMO Assets/WarFX/Demo/Assets/CFX_Demo_RandomDir.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Assets/JMO Assets/WarFX/Demo/Assets/CFX_Demo_RotateCamera.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using UnityEngine;
using System.Collections;

public class CFX_Demo_RotateCamera : MonoBehaviour
{
static public bool rotating = true;

public float speed = 30.0f;
public Transform rotationCenter;

void Update ()
{
if(rotating)
transform.RotateAround(rotationCenter.position, Vector3.up, speed*Time.deltaTime);
}
}
14 changes: 14 additions & 0 deletions Assets/JMO Assets/WarFX/Demo/Assets/CFX_Demo_RotateCamera.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions Assets/JMO Assets/WarFX/Demo/Assets/CFX_Demo_Translate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using UnityEngine;
using System.Collections;

// Cartoon FX - (c) 2015, Jean Moreno

public class CFX_Demo_Translate : MonoBehaviour
{
public float speed = 30.0f;
public Vector3 rotation = Vector3.forward;
public Vector3 axis = Vector3.forward;
public bool gravity;
private Vector3 dir;

void Start ()
{
dir = new Vector3(Random.Range(0.0f,360.0f),Random.Range(0.0f,360.0f),Random.Range(0.0f,360.0f));
dir.Scale(rotation);
this.transform.localEulerAngles = dir;
}

void Update ()
{
this.transform.Translate(axis * speed * Time.deltaTime, Space.Self);
}
}
15 changes: 15 additions & 0 deletions Assets/JMO Assets/WarFX/Demo/Assets/CFX_Demo_Translate.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading