Skip to content

Instantly share code, notes, and snippets.

@walkies
Created June 28, 2018 07:23
Show Gist options
  • Save walkies/61bdf76af4b3ddef9a8d69857df0234a to your computer and use it in GitHub Desktop.
Save walkies/61bdf76af4b3ddef9a8d69857df0234a to your computer and use it in GitHub Desktop.
CollisionBehaviourData
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class CollisionBehaviourData {
[Header("Collision")]
[Tooltip("Tag of object colliding with.")]
public string tag;
[Tooltip("Does this gameobject bounce away after a collision")]
public bool bounceThis;
[Header("Destroy")]
[Tooltip("Destroy this object on collision?")]
public bool destroyThis;
[Header("Effects To Play")]
[Tooltip("Scriptable object of EffectBundleData, empty fields won't play any effect.")]
public EffectBundleData effectsToPlay;
//collider is needed to calculate point of contact and redirect object in other direction.
[HideInInspector]
public Collision col;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment