Added some libraries
1789
Assets/CircularGravityForce/CGF.cs
Normal file
10
Assets/CircularGravityForce/CGF.cs.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 87af34050099e304aa6a8c92272087e3
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: ba43097a61014ab44a2382800df70049, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1428
Assets/CircularGravityForce/CGF2D.cs
Normal file
10
Assets/CircularGravityForce/CGF2D.cs.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d97a967d72891a34da7d7400ed2c877c
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: ba43097a61014ab44a2382800df70049, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
5
Assets/CircularGravityForce/Common.meta
Normal file
|
@ -0,0 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6c5b5a70d9acefa4cbbdc9d89809669c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
117
Assets/CircularGravityForce/Common/CGFCollection.cs
Normal file
|
@ -0,0 +1,117 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for a CGF data structer.
|
||||
*******************************************************************************************/
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
public class CGFCollection
|
||||
{
|
||||
public class EffectedObject
|
||||
{
|
||||
private Rigidbody rigidbody;
|
||||
public Rigidbody _rigidbody
|
||||
{
|
||||
get { return rigidbody; }
|
||||
set { rigidbody = value; }
|
||||
}
|
||||
|
||||
private object objectHistory;
|
||||
public object ObjectHistory
|
||||
{
|
||||
get { return objectHistory; }
|
||||
set { objectHistory = value; }
|
||||
}
|
||||
|
||||
private float gameTime;
|
||||
public float GameTime
|
||||
{
|
||||
get { return gameTime; }
|
||||
set { gameTime = value; }
|
||||
}
|
||||
|
||||
private float timeEffected;
|
||||
public float TimeEffected
|
||||
{
|
||||
get { return timeEffected; }
|
||||
set { timeEffected = value; }
|
||||
}
|
||||
}
|
||||
|
||||
private List<EffectedObject> effectedObjects;
|
||||
public List<EffectedObject> EffectedObjects
|
||||
{
|
||||
get { return effectedObjects; }
|
||||
set { effectedObjects = value; }
|
||||
}
|
||||
|
||||
public CGFCollection()
|
||||
{
|
||||
EffectedObjects = new List<EffectedObject>();
|
||||
}
|
||||
|
||||
public void Add(Rigidbody rigid, float gameTime, float timeEffected)
|
||||
{
|
||||
bool foundFlag = false;
|
||||
for (int i = 0; i < EffectedObjects.Count; i++)
|
||||
{
|
||||
if (EffectedObjects[i]._rigidbody == rigid)
|
||||
{
|
||||
EffectedObjects[i].GameTime = gameTime;
|
||||
EffectedObjects[i].TimeEffected = timeEffected;
|
||||
|
||||
foundFlag = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundFlag)
|
||||
{
|
||||
var item = new EffectedObject();
|
||||
item._rigidbody = rigid;
|
||||
|
||||
item.GameTime = gameTime;
|
||||
item.TimeEffected = timeEffected;
|
||||
SetEffectedObjectHistory(rigid, item);
|
||||
EffectedObjects.Add(item);
|
||||
}
|
||||
|
||||
UpdateEffectedObject(rigid);
|
||||
}
|
||||
|
||||
public void Sync()
|
||||
{
|
||||
if (EffectedObjects.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < EffectedObjects.Count; i++)
|
||||
{
|
||||
if ((Time.time - EffectedObjects[i].GameTime) > EffectedObjects[i].TimeEffected)
|
||||
{
|
||||
ResetEffectedObject(EffectedObjects[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void SetEffectedObjectHistory(Rigidbody rigid, EffectedObject effectedObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void UpdateEffectedObject(Rigidbody rigid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void ResetEffectedObject(EffectedObject effectedObject)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
8
Assets/CircularGravityForce/Common/CGFCollection.cs.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f8640210c45296a41afbc06d2a93aebf
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
117
Assets/CircularGravityForce/Common/CGFCollection2D.cs
Normal file
|
@ -0,0 +1,117 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for a CGF data structer 2D.
|
||||
*******************************************************************************************/
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
public class CGFCollection2D
|
||||
{
|
||||
public class EffectedObject
|
||||
{
|
||||
private Rigidbody2D rigidbody;
|
||||
public Rigidbody2D _rigidbody
|
||||
{
|
||||
get { return rigidbody; }
|
||||
set { rigidbody = value; }
|
||||
}
|
||||
|
||||
private object objectHistory;
|
||||
public object ObjectHistory
|
||||
{
|
||||
get { return objectHistory; }
|
||||
set { objectHistory = value; }
|
||||
}
|
||||
|
||||
private float gameTime;
|
||||
public float GameTime
|
||||
{
|
||||
get { return gameTime; }
|
||||
set { gameTime = value; }
|
||||
}
|
||||
|
||||
private float timeEffected;
|
||||
public float TimeEffected
|
||||
{
|
||||
get { return timeEffected; }
|
||||
set { timeEffected = value; }
|
||||
}
|
||||
}
|
||||
|
||||
private List<EffectedObject> effectedObjects;
|
||||
public List<EffectedObject> EffectedObjects
|
||||
{
|
||||
get { return effectedObjects; }
|
||||
set { effectedObjects = value; }
|
||||
}
|
||||
|
||||
public CGFCollection2D()
|
||||
{
|
||||
EffectedObjects = new List<EffectedObject>();
|
||||
}
|
||||
|
||||
public void Add(Rigidbody2D rigid, float gameTime, float timeEffected)
|
||||
{
|
||||
bool foundFlag = false;
|
||||
for (int i = 0; i < EffectedObjects.Count; i++)
|
||||
{
|
||||
if (EffectedObjects[i]._rigidbody == rigid)
|
||||
{
|
||||
EffectedObjects[i].GameTime = gameTime;
|
||||
EffectedObjects[i].TimeEffected = timeEffected;
|
||||
|
||||
foundFlag = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundFlag)
|
||||
{
|
||||
var item = new EffectedObject();
|
||||
item._rigidbody = rigid;
|
||||
|
||||
item.GameTime = gameTime;
|
||||
item.TimeEffected = timeEffected;
|
||||
SetEffectedObjectHistory(rigid, item);
|
||||
EffectedObjects.Add(item);
|
||||
}
|
||||
|
||||
UpdateEffectedObject(rigid);
|
||||
}
|
||||
|
||||
public void Sync()
|
||||
{
|
||||
if (EffectedObjects.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < EffectedObjects.Count; i++)
|
||||
{
|
||||
if ((Time.time - EffectedObjects[i].GameTime) > EffectedObjects[i].TimeEffected)
|
||||
{
|
||||
ResetEffectedObject(EffectedObjects[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void SetEffectedObjectHistory(Rigidbody2D rigid, EffectedObject effectedObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void UpdateEffectedObject(Rigidbody2D rigid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void ResetEffectedObject(EffectedObject effectedObject)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e6cc8c2e251aaa440b0a89a35f83facc
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
9
Assets/CircularGravityForce/Editor.meta
Normal file
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 92b85dc0098b7564aa11bf61e828c6bc
|
||||
folderAsset: yes
|
||||
timeCreated: 1455067498
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
973
Assets/CircularGravityForce/Editor/CGF2D_Editor.cs
Normal file
|
@ -0,0 +1,973 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used overwriting the Inspector GUI, and Scene GUI
|
||||
*******************************************************************************************/
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using CircularGravityForce;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
[CustomEditor(typeof(CGF2D)), CanEditMultipleObjects]
|
||||
public class CGF2D_Editor : Editor
|
||||
{
|
||||
private GUIStyle panelStyle;
|
||||
private GUIStyle titleStyle;
|
||||
private TitleImage titleImage;
|
||||
|
||||
private SerializedProperty enable_property;
|
||||
private SerializedProperty shape_property;
|
||||
private SerializedProperty forceType_property;
|
||||
private SerializedProperty forceMode_property;
|
||||
private SerializedProperty projectRight_property;
|
||||
private SerializedProperty forcePower_property;
|
||||
private SerializedProperty velocityDamping_property;
|
||||
private SerializedProperty angularVelocityDamping_property;
|
||||
private SerializedProperty size_property;
|
||||
private SerializedProperty boxSize_property;
|
||||
|
||||
private SerializedProperty toggleTransformProperties;
|
||||
private SerializedProperty transformProperties_overridePosition;
|
||||
private SerializedProperty transformProperties_localPosition;
|
||||
private SerializedProperty transformProperties_positionValue;
|
||||
private SerializedProperty transformProperties_overrideRotation;
|
||||
private SerializedProperty transformProperties_localRotation;
|
||||
private SerializedProperty transformProperties_rotationValue;
|
||||
|
||||
private SerializedProperty toggleForcePositionProperties;
|
||||
private SerializedProperty forcePositionProperties_forcePosition;
|
||||
private SerializedProperty forcePositionProperties_closestColliders;
|
||||
private SerializedProperty forcePositionProperties_useEffectedClosestPoint;
|
||||
private SerializedProperty forcePositionProperties_heightOffset;
|
||||
|
||||
private SerializedProperty toggleEventProperties;
|
||||
private SerializedProperty eventProperties_enableEvents;
|
||||
private SerializedProperty eventProperties_enableSendMessage;
|
||||
|
||||
private SerializedProperty toggleMemoryProperties_property;
|
||||
private SerializedProperty memoryProperties_colliderLayerMask_property;
|
||||
private SerializedProperty memoryProperties_seeAffectedColliders_property;
|
||||
private SerializedProperty memoryProperties_seeAffectedRaycastHits_property;
|
||||
private SerializedProperty memoryProperties_nonAllocPhysics_property;
|
||||
private SerializedProperty memoryProperties_colliderBuffer_property;
|
||||
private SerializedProperty memoryProperties_raycastHitBuffer_property;
|
||||
|
||||
private SerializedProperty colliderListCount_property;
|
||||
private SerializedProperty raycastHitListCount_property;
|
||||
|
||||
private CGF2D cgf;
|
||||
|
||||
private bool change = false;
|
||||
private float spacing = 10f;
|
||||
|
||||
private Color redBar = new Color(1f, 0f, 0f, .4f);
|
||||
|
||||
private string helpText;
|
||||
private MessageType messageType = MessageType.Info;
|
||||
|
||||
public void OnEnable()
|
||||
{
|
||||
//Title Image Resource
|
||||
titleImage = new TitleImage("Assets/ResurgamStudios/CircularGravityForce Package/Gizmos/CGF Title.png");
|
||||
|
||||
enable_property = serializedObject.FindProperty("enable");
|
||||
shape_property = serializedObject.FindProperty("shape2D");
|
||||
forceType_property = serializedObject.FindProperty("forceType2D");
|
||||
forceMode_property = serializedObject.FindProperty("forceMode2D");
|
||||
projectRight_property = serializedObject.FindProperty("projectRight");
|
||||
forcePower_property = serializedObject.FindProperty("forcePower");
|
||||
velocityDamping_property = serializedObject.FindProperty("velocityDamping");
|
||||
angularVelocityDamping_property = serializedObject.FindProperty("angularVelocityDamping");
|
||||
size_property = serializedObject.FindProperty("size");
|
||||
boxSize_property = serializedObject.FindProperty("boxSize");
|
||||
|
||||
toggleTransformProperties = serializedObject.FindProperty("transformProperties.toggleTransformProperties");
|
||||
transformProperties_overridePosition = serializedObject.FindProperty("transformProperties.overridePosition");
|
||||
transformProperties_localPosition = serializedObject.FindProperty("transformProperties.localPosition");
|
||||
transformProperties_positionValue = serializedObject.FindProperty("transformProperties.positionValue");
|
||||
transformProperties_overrideRotation = serializedObject.FindProperty("transformProperties.overrideRotation");
|
||||
transformProperties_localRotation = serializedObject.FindProperty("transformProperties.localRotation");
|
||||
transformProperties_rotationValue = serializedObject.FindProperty("transformProperties.rotationValue");
|
||||
|
||||
toggleForcePositionProperties = serializedObject.FindProperty("forcePositionProperties.toggleForcePositionProperties");
|
||||
forcePositionProperties_forcePosition = serializedObject.FindProperty("forcePositionProperties.forcePosition");
|
||||
forcePositionProperties_closestColliders = serializedObject.FindProperty("forcePositionProperties.closestColliders");
|
||||
forcePositionProperties_useEffectedClosestPoint = serializedObject.FindProperty("forcePositionProperties.useEffectedClosestPoint");
|
||||
forcePositionProperties_heightOffset = serializedObject.FindProperty("forcePositionProperties.heightOffset");
|
||||
|
||||
toggleEventProperties = serializedObject.FindProperty("eventProperties.toggleEventProperties");
|
||||
eventProperties_enableEvents = serializedObject.FindProperty("eventProperties.enableEvents");
|
||||
eventProperties_enableSendMessage = serializedObject.FindProperty("eventProperties.enableSendMessage");
|
||||
|
||||
toggleMemoryProperties_property = serializedObject.FindProperty("memoryProperties.toggleMemoryProperties");
|
||||
memoryProperties_colliderLayerMask_property = serializedObject.FindProperty("memoryProperties.colliderLayerMask");
|
||||
memoryProperties_seeAffectedColliders_property = serializedObject.FindProperty("memoryProperties.seeColliders");
|
||||
memoryProperties_seeAffectedRaycastHits_property = serializedObject.FindProperty("memoryProperties.seeRaycastHits");
|
||||
memoryProperties_nonAllocPhysics_property = serializedObject.FindProperty("memoryProperties.nonAllocPhysics");
|
||||
memoryProperties_colliderBuffer_property = serializedObject.FindProperty("memoryProperties.colliderBuffer");
|
||||
memoryProperties_raycastHitBuffer_property = serializedObject.FindProperty("memoryProperties.raycastHitBuffer");
|
||||
colliderListCount_property = serializedObject.FindProperty("colliderListCount");
|
||||
raycastHitListCount_property = serializedObject.FindProperty("raycastHitListCount");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
panelStyle = new GUIStyle(GUI.skin.box);
|
||||
panelStyle.padding = new RectOffset(panelStyle.padding.left + 10, panelStyle.padding.right, panelStyle.padding.top, panelStyle.padding.bottom);
|
||||
EditorGUILayout.BeginVertical(panelStyle);
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
titleStyle = new GUIStyle(GUI.skin.label);
|
||||
titleStyle.alignment = TextAnchor.UpperCenter;
|
||||
GUILayout.BeginVertical();
|
||||
GUILayout.Box(titleImage.content, titleStyle);
|
||||
GUILayout.EndVertical();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#if (UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2)
|
||||
if (shape_property.enumValueIndex == (int)CGF2D.Shape2D.Box)
|
||||
EditorGUILayout.HelpBox(CGF.WarningMessageBoxUnity_5_3, MessageType.Warning, true);
|
||||
#endif
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(enable_property, new GUIContent("Enable"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
enable_property.boolValue = EditorGUILayout.Toggle(enable_property.boolValue);
|
||||
change = true;
|
||||
}
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(shape_property, new GUIContent("Shape"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
shape_property.enumValueIndex = Convert.ToInt32(EditorGUILayout.EnumPopup((CGF2D.Shape2D)shape_property.enumValueIndex));
|
||||
change = true;
|
||||
}
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(forceType_property, new GUIContent("Force Type"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
forceType_property.enumValueIndex = Convert.ToInt32(EditorGUILayout.EnumPopup((CGF.ForceType)forceType_property.enumValueIndex));
|
||||
change = true;
|
||||
}
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
if (helpText != string.Empty)
|
||||
EditorGUILayout.HelpBox(helpText, messageType, true);
|
||||
|
||||
switch (forceType_property.enumValueIndex)
|
||||
{
|
||||
case (int)CGF2D.ForceType2D.ForceAtPosition:
|
||||
helpText = "Applies force at position. As a result this will apply a torque and force on the objects.";
|
||||
break;
|
||||
case (int)CGF2D.ForceType2D.Force:
|
||||
helpText = "Adds a force to the objects.";
|
||||
break;
|
||||
case (int)CGF2D.ForceType2D.Torque:
|
||||
helpText = "Adds a torque to the objects.";
|
||||
break;
|
||||
case (int)CGF2D.ForceType2D.GravitationalAttraction:
|
||||
helpText = "Adds gravitational attraction based off newtonian gravity.";
|
||||
break;
|
||||
}
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(forceMode_property, new GUIContent("Force Mode"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
forceMode_property.enumValueIndex = Convert.ToInt32(EditorGUILayout.EnumPopup((ForceMode)forceMode_property.enumValueIndex));
|
||||
change = true;
|
||||
}
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
if (shape_property.enumValueIndex != (int)CGF2D.Shape2D.Raycast)
|
||||
{
|
||||
switch (forceType_property.enumValueIndex)
|
||||
{
|
||||
case (int)CGF2D.ForceType2D.ForceAtPosition:
|
||||
case (int)CGF2D.ForceType2D.Force:
|
||||
case (int)CGF2D.ForceType2D.GravitationalAttraction:
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(projectRight_property, new GUIContent("Project Right"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
projectRight_property.boolValue = EditorGUILayout.Toggle(projectRight_property.boolValue);
|
||||
change = true;
|
||||
}
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (forceType_property.enumValueIndex)
|
||||
{
|
||||
case (int)CGF2D.ForceType2D.ForceAtPosition:
|
||||
case (int)CGF2D.ForceType2D.Force:
|
||||
case (int)CGF2D.ForceType2D.GravitationalAttraction:
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(velocityDamping_property, new GUIContent("Velocity Damping"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
velocityDamping_property.floatValue = EditorGUILayout.FloatField(velocityDamping_property.floatValue);
|
||||
change = true;
|
||||
}
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
break;
|
||||
case (int)CGF.ForceType.Torque:
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(angularVelocityDamping_property, new GUIContent("Angular Velocity Damping"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
angularVelocityDamping_property.floatValue = EditorGUILayout.FloatField(angularVelocityDamping_property.floatValue);
|
||||
change = true;
|
||||
}
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(forcePower_property, new GUIContent("Force Power"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
forcePower_property.floatValue = EditorGUILayout.FloatField(forcePower_property.floatValue);
|
||||
change = true;
|
||||
}
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
if (shape_property.enumValueIndex == (int)CGF2D.Shape2D.Box)
|
||||
{
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(boxSize_property, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(size_property, new GUIContent("Size"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
if (size_property.floatValue >= 0)
|
||||
{
|
||||
size_property.floatValue = EditorGUILayout.FloatField(size_property.floatValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
size_property.floatValue = 0;
|
||||
}
|
||||
|
||||
change = true;
|
||||
}
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
}
|
||||
|
||||
toggleTransformProperties.boolValue = EditorGUILayout.Foldout(toggleTransformProperties.boolValue, "Transform Properties");
|
||||
if (toggleTransformProperties.boolValue)
|
||||
{
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(transformProperties_overridePosition, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
if (transformProperties_overridePosition.boolValue)
|
||||
{
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(transformProperties_localPosition, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(transformProperties_positionValue, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
}
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(transformProperties_overrideRotation, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
if (transformProperties_overrideRotation.boolValue)
|
||||
{
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(transformProperties_localRotation, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(transformProperties_rotationValue, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
}
|
||||
}
|
||||
|
||||
switch (forceType_property.enumValueIndex)
|
||||
{
|
||||
case (int)CGF2D.ForceType2D.ForceAtPosition:
|
||||
case (int)CGF2D.ForceType2D.Force:
|
||||
case (int)CGF2D.ForceType2D.GravitationalAttraction:
|
||||
|
||||
toggleForcePositionProperties.boolValue = EditorGUILayout.Foldout(toggleForcePositionProperties.boolValue, "Force Position Properties");
|
||||
if (toggleForcePositionProperties.boolValue)
|
||||
{
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(forcePositionProperties_forcePosition, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
if (forcePositionProperties_forcePosition.enumValueIndex == (int)CGF.ForcePosition.ClosestCollider)
|
||||
{
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(forcePositionProperties_closestColliders, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(forcePositionProperties_useEffectedClosestPoint, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(forcePositionProperties_heightOffset, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("filterProperties"), true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
toggleEventProperties.boolValue = EditorGUILayout.Foldout(toggleEventProperties.boolValue, "Event Properties");
|
||||
if (toggleEventProperties.boolValue)
|
||||
{
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(eventProperties_enableEvents, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
if (eventProperties_enableEvents.boolValue)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.TextArea("//Enable Events Example:\n\nusing CircularGravityForce;\n\nvoid Awake()\n{\n CGF2D.OnApplyCGFEvent += CGF_OnApplyCGFEvent;\n}\n\nvoid OnDestroy()\n{\n CGF2D.OnApplyCGFEvent -= CGF_OnApplyCGFEvent;\n}\n\nprivate void CGF_OnApplyCGFEvent(CGF2D cgf, Rigidbody2D rigid, Collider2D coll)\n{\n Debug.Log(\"Hello World\");\n}", GUILayout.ExpandWidth(true), GUILayout.MinWidth(0));
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(eventProperties_enableSendMessage, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
if (eventProperties_enableSendMessage.boolValue)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.TextArea("//Enable Events Example:\n\nusing CircularGravityForce;\n\nprivate void OnApplyCGF(CGF2D cgf)\n{\n Debug.Log(\"Hello World\");\n}\n", GUILayout.ExpandWidth(true), GUILayout.MinWidth(0));
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(serializedObject.FindProperty("drawGravityProperties"), true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
toggleMemoryProperties_property.boolValue = EditorGUILayout.Foldout(toggleMemoryProperties_property.boolValue, "Memory Properties");
|
||||
if (toggleMemoryProperties_property.boolValue)
|
||||
{
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(memoryProperties_colliderLayerMask_property, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
if (shape_property.enumValueIndex == (int)CGF.Shape.Sphere || shape_property.enumValueIndex == (int)CGF.Shape.Box)
|
||||
{
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(memoryProperties_seeAffectedColliders_property, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
}
|
||||
|
||||
if (shape_property.enumValueIndex == (int)CGF.Shape.Capsule || shape_property.enumValueIndex == (int)CGF.Shape.Raycast)
|
||||
{
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(memoryProperties_seeAffectedRaycastHits_property, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
}
|
||||
|
||||
if (Application.isPlaying)
|
||||
GUI.enabled = false;
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(memoryProperties_nonAllocPhysics_property, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
GUI.enabled = true;
|
||||
|
||||
if (memoryProperties_nonAllocPhysics_property.boolValue)
|
||||
{
|
||||
|
||||
if (shape_property.enumValueIndex == (int)CGF2D.Shape2D.Sphere)
|
||||
{
|
||||
if (Application.isPlaying)
|
||||
GUI.enabled = false;
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(memoryProperties_colliderBuffer_property, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
if (memoryProperties_colliderBuffer_property.intValue >= 1)
|
||||
{
|
||||
memoryProperties_colliderBuffer_property.intValue = EditorGUILayout.IntField(memoryProperties_colliderBuffer_property.intValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
memoryProperties_colliderBuffer_property.intValue = 1;
|
||||
}
|
||||
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
GUI.enabled = true;
|
||||
|
||||
float collidersUsed = (float)colliderListCount_property.intValue;
|
||||
float collidersNotUsed = (float)memoryProperties_colliderBuffer_property.intValue;
|
||||
float collidersUsedPercent = collidersUsed / collidersNotUsed;
|
||||
|
||||
if (collidersUsedPercent == 1f)
|
||||
GUI.backgroundColor = redBar;
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUI.ProgressBar(EditorGUILayout.BeginVertical(), collidersUsedPercent, string.Format("{0} : {1}", collidersUsed, collidersNotUsed));
|
||||
GUILayout.Space(16);
|
||||
EditorGUILayout.EndVertical();
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
if (shape_property.enumValueIndex == (int)CGF2D.Shape2D.Raycast || shape_property.enumValueIndex == (int)CGF2D.Shape2D.Box)
|
||||
{
|
||||
if (Application.isPlaying)
|
||||
GUI.enabled = false;
|
||||
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(memoryProperties_raycastHitBuffer_property, true, GUILayout.ExpandWidth(true));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
if (memoryProperties_raycastHitBuffer_property.intValue >= 1)
|
||||
{
|
||||
memoryProperties_raycastHitBuffer_property.intValue = EditorGUILayout.IntField(memoryProperties_raycastHitBuffer_property.intValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
memoryProperties_raycastHitBuffer_property.intValue = 1;
|
||||
}
|
||||
|
||||
change = true;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
/*<----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
GUI.enabled = true;
|
||||
|
||||
float raycastHitsUsed = (float)raycastHitListCount_property.intValue;
|
||||
float raycastHitsNotUsed = (float)memoryProperties_raycastHitBuffer_property.intValue;
|
||||
float raycastHitsUsedPercent = raycastHitsUsed / raycastHitsNotUsed;
|
||||
|
||||
if (raycastHitsUsedPercent == 1f)
|
||||
GUI.backgroundColor = redBar;
|
||||
|
||||
if (raycastHitsUsedPercent == 1f)
|
||||
GUI.color = Color.magenta;
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("", GUILayout.Width(spacing));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUI.ProgressBar(EditorGUILayout.BeginVertical(), raycastHitsUsedPercent, string.Format("{0} : {1}", raycastHitsUsed, raycastHitsNotUsed));
|
||||
GUILayout.Space(16);
|
||||
EditorGUILayout.EndVertical();
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
if (change)
|
||||
{
|
||||
change = false;
|
||||
}
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
void OnSceneGUI()
|
||||
{
|
||||
cgf = (CGF2D)target;
|
||||
|
||||
if (cgf._drawGravityProperties.DrawGizmo)
|
||||
{
|
||||
|
||||
Color mainColor;
|
||||
Color tranMainColor;
|
||||
|
||||
if (cgf.Enable)
|
||||
{
|
||||
if (cgf.ForcePower == 0)
|
||||
{
|
||||
mainColor = Color.white;
|
||||
tranMainColor = Color.white;
|
||||
}
|
||||
else if (cgf.ForcePower > 0)
|
||||
{
|
||||
mainColor = Color.green;
|
||||
tranMainColor = Color.green;
|
||||
}
|
||||
else
|
||||
{
|
||||
mainColor = Color.red;
|
||||
tranMainColor = Color.red;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mainColor = Color.white;
|
||||
tranMainColor = Color.white;
|
||||
}
|
||||
|
||||
tranMainColor.a = .1f;
|
||||
|
||||
Handles.color = mainColor;
|
||||
|
||||
float gizmoSize = 0f;
|
||||
float gizmoOffset = 0f;
|
||||
|
||||
if (mainColor == Color.green)
|
||||
{
|
||||
gizmoSize = (cgf.Size / 8f);
|
||||
if (gizmoSize > .5f)
|
||||
gizmoSize = .5f;
|
||||
else if (gizmoSize < -.5f)
|
||||
gizmoSize = -.5f;
|
||||
gizmoOffset = -gizmoSize / 1.5f;
|
||||
}
|
||||
else if (mainColor == Color.red)
|
||||
{
|
||||
gizmoSize = -(cgf.Size / 8f);
|
||||
if (gizmoSize > .5f)
|
||||
gizmoSize = .5f;
|
||||
else if (gizmoSize < -.5f)
|
||||
gizmoSize = -.5f;
|
||||
gizmoOffset = gizmoSize / 1.5f;
|
||||
}
|
||||
|
||||
Quaternion qUp = cgf.transform.transform.rotation;
|
||||
qUp.SetLookRotation(cgf.transform.rotation * Vector3.up);
|
||||
Quaternion qDown = cgf.transform.transform.rotation;
|
||||
qDown.SetLookRotation(cgf.transform.rotation * Vector3.down);
|
||||
Quaternion qLeft = cgf.transform.transform.rotation;
|
||||
qLeft.SetLookRotation(cgf.transform.rotation * Vector3.forward);
|
||||
Quaternion qRight = cgf.transform.transform.rotation;
|
||||
qRight.SetLookRotation(cgf.transform.rotation * Vector3.back);
|
||||
Quaternion qForward = cgf.transform.transform.rotation;
|
||||
qForward.SetLookRotation(cgf.transform.rotation * Vector3.right);
|
||||
Quaternion qBack = cgf.transform.transform.rotation;
|
||||
qBack.SetLookRotation(cgf.transform.rotation * Vector3.left);
|
||||
|
||||
float dotSpace = 10f;
|
||||
float sizeValue = cgf.Size;
|
||||
float sizeBoxValueX = cgf.BoxSize.x;
|
||||
float sizeBoxValueY = cgf.BoxSize.y;
|
||||
|
||||
switch (cgf._shape2D)
|
||||
{
|
||||
case CGF2D.Shape2D.Sphere:
|
||||
|
||||
Handles.color = tranMainColor;
|
||||
Handles.color = mainColor;
|
||||
|
||||
if ((cgf._forceType2D == CGF2D.ForceType2D.ForceAtPosition ||
|
||||
cgf._forceType2D == CGF2D.ForceType2D.GravitationalAttraction ||
|
||||
cgf._forceType2D == CGF2D.ForceType2D.Force) &&
|
||||
!cgf._projectRight)
|
||||
{
|
||||
if (cgf._forcePositionProperties.ForcePosition == CGF.ForcePosition.ThisTransform)
|
||||
{
|
||||
DrawConeCap(GetVector(Vector3.up, cgf.Size + gizmoOffset, 1f), qUp, gizmoSize);
|
||||
DrawConeCap(GetVector(Vector3.down, cgf.Size + gizmoOffset, 1f), qDown, gizmoSize);
|
||||
DrawConeCap(GetVector(Vector3.left, cgf.Size + gizmoOffset, 1f), qBack, gizmoSize);
|
||||
}
|
||||
}
|
||||
else if (cgf._forceType2D == CGF2D.ForceType2D.Torque)
|
||||
{
|
||||
DrawConeCap(GetVector(Vector3.up, cgf.Size + gizmoOffset, 1f), qForward, gizmoSize);
|
||||
DrawConeCap(GetVector(Vector3.down, cgf.Size + gizmoOffset, 1f), qBack, gizmoSize);
|
||||
DrawConeCap(GetVector(Vector3.right, cgf.Size + gizmoOffset, 1f), qDown, gizmoSize);
|
||||
DrawConeCap(GetVector(Vector3.left, cgf.Size + gizmoOffset, 1f), qUp, gizmoSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cgf._forcePositionProperties.ForcePosition == CGF.ForcePosition.ThisTransform)
|
||||
{
|
||||
DrawConeCap(GetVector(Vector3.left, cgf.Size + gizmoOffset, 1f), qBack, -gizmoSize);
|
||||
}
|
||||
}
|
||||
|
||||
if (cgf._forceType2D != CGF2D.ForceType2D.Torque)
|
||||
{
|
||||
if (cgf._forcePositionProperties.ForcePosition == CGF.ForcePosition.ThisTransform)
|
||||
{
|
||||
DrawConeCap(GetVector(Vector3.right, cgf.Size + gizmoOffset, 1f), qForward, gizmoSize);
|
||||
}
|
||||
}
|
||||
|
||||
Handles.DrawDottedLine(GetVector(Vector3.up, cgf.Size, 1), cgf.transform.position, dotSpace);
|
||||
Handles.DrawDottedLine(GetVector(Vector3.down, cgf.Size, 1), cgf.transform.position, dotSpace);
|
||||
Handles.DrawDottedLine(GetVector(Vector3.left, cgf.Size, 1), cgf.transform.position, dotSpace);
|
||||
Handles.DrawDottedLine(GetVector(Vector3.right, cgf.Size, 1), cgf.transform.position, dotSpace);
|
||||
|
||||
DrawCircleCap(cgf.transform.position, qLeft, cgf.Size);
|
||||
|
||||
Handles.color = mainColor;
|
||||
sizeValue = cgf.Size;
|
||||
sizeValue = DrawScaleValueHandle(sizeValue, GetVector(Vector3.up, cgf.Size, 1f), cgf.transform.rotation, gizmoSize);
|
||||
sizeValue = DrawScaleValueHandle(sizeValue, GetVector(Vector3.down, cgf.Size, 1f), cgf.transform.rotation, gizmoSize);
|
||||
sizeValue = DrawScaleValueHandle(sizeValue, GetVector(Vector3.left, cgf.Size, 1f), cgf.transform.rotation, gizmoSize);
|
||||
sizeValue = DrawScaleValueHandle(sizeValue, GetVector(Vector3.right, cgf.Size, 1f), cgf.transform.rotation, gizmoSize);
|
||||
if (sizeValue < 0)
|
||||
cgf.Size = 0;
|
||||
else
|
||||
cgf.Size = sizeValue;
|
||||
|
||||
break;
|
||||
case CGF2D.Shape2D.Raycast:
|
||||
|
||||
Handles.DrawDottedLine(cgf.transform.position + ((cgf.transform.rotation * Vector3.right) * cgf.Size), cgf.transform.position, dotSpace);
|
||||
|
||||
if (cgf._forceType2D != CGF2D.ForceType2D.Torque)
|
||||
{
|
||||
if (cgf._forcePositionProperties.ForcePosition == CGF.ForcePosition.ThisTransform)
|
||||
{
|
||||
DrawConeCap(GetVector(Vector3.right, cgf.Size + gizmoOffset, 1f), qForward, gizmoSize);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawConeCap(GetVector(Vector3.right, cgf.Size + gizmoOffset, 1f), qDown, gizmoSize);
|
||||
}
|
||||
|
||||
Handles.color = mainColor;
|
||||
sizeValue = cgf.Size;
|
||||
sizeValue = DrawScaleValueHandle(sizeValue, GetVector(Vector3.right, cgf.Size, 1f), cgf.transform.rotation, gizmoSize);
|
||||
if (sizeValue < 0)
|
||||
cgf.Size = 0;
|
||||
else
|
||||
cgf.Size = sizeValue;
|
||||
|
||||
break;
|
||||
case CGF2D.Shape2D.Box:
|
||||
|
||||
if ((cgf._forceType2D == CGF2D.ForceType2D.ForceAtPosition ||
|
||||
cgf._forceType2D == CGF2D.ForceType2D.GravitationalAttraction ||
|
||||
cgf._forceType2D == CGF2D.ForceType2D.Force) &&
|
||||
!cgf._projectRight)
|
||||
{
|
||||
if (cgf._forcePositionProperties.ForcePosition == CGF.ForcePosition.ThisTransform)
|
||||
{
|
||||
DrawConeCap(GetVector(Vector3.up, CGF_Editor.GetArrowOffsetForBox(mainColor, cgf.BoxSize.y, gizmoSize), 1f), qUp, CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.y));
|
||||
DrawConeCap(GetVector(Vector3.down, CGF_Editor.GetArrowOffsetForBox(mainColor, cgf.BoxSize.y, gizmoSize), 1f), qDown, CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.y));
|
||||
DrawConeCap(GetVector(Vector3.left, CGF_Editor.GetArrowOffsetForBox(mainColor, cgf.BoxSize.x, gizmoSize), 1f), qBack, CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.x));
|
||||
}
|
||||
}
|
||||
else if (cgf._forceType2D == CGF2D.ForceType2D.Torque)
|
||||
{
|
||||
DrawConeCap(GetVector(Vector3.up, CGF_Editor.GetArrowOffsetForBox(mainColor, cgf.BoxSize.y, gizmoSize), 1f), qForward, CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.y));
|
||||
DrawConeCap(GetVector(Vector3.down, CGF_Editor.GetArrowOffsetForBox(mainColor, cgf.BoxSize.y, gizmoSize), 1f), qBack, CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.y));
|
||||
DrawConeCap(GetVector(Vector3.right, CGF_Editor.GetArrowOffsetForBox(mainColor, cgf.BoxSize.x, gizmoSize), 1f), qDown, CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.x));
|
||||
DrawConeCap(GetVector(Vector3.left, CGF_Editor.GetArrowOffsetForBox(mainColor, cgf.BoxSize.x, gizmoSize), 1f), qUp, CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.x));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cgf._forcePositionProperties.ForcePosition == CGF.ForcePosition.ThisTransform)
|
||||
{
|
||||
DrawConeCap(GetVector(Vector3.left, CGF_Editor.GetArrowOffsetForBox(mainColor, cgf.BoxSize.x, gizmoSize), 1f), qBack, -CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.x));
|
||||
}
|
||||
}
|
||||
|
||||
if (cgf._forceType2D != CGF2D.ForceType2D.Torque)
|
||||
{
|
||||
if (cgf._forcePositionProperties.ForcePosition == CGF.ForcePosition.ThisTransform)
|
||||
{
|
||||
DrawConeCap(GetVector(Vector3.right, CGF_Editor.GetArrowOffsetForBox(mainColor, cgf.BoxSize.x, gizmoSize), 1f), qForward, CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.x));
|
||||
}
|
||||
}
|
||||
|
||||
Handles.DrawDottedLine(GetVector(Vector3.up, cgf.BoxSize.y, 1), cgf.transform.position, dotSpace);
|
||||
Handles.DrawDottedLine(GetVector(Vector3.down, cgf.BoxSize.y, 1), cgf.transform.position, dotSpace);
|
||||
Handles.DrawDottedLine(GetVector(Vector3.left, cgf.BoxSize.x, 1), cgf.transform.position, dotSpace);
|
||||
Handles.DrawDottedLine(GetVector(Vector3.right, cgf.BoxSize.x, 1), cgf.transform.position, dotSpace);
|
||||
|
||||
Handles.color = mainColor;
|
||||
sizeBoxValueX = cgf.BoxSize.x;
|
||||
sizeBoxValueY = cgf.BoxSize.y;
|
||||
sizeBoxValueY = DrawScaleValueHandle(sizeBoxValueY, GetVector(Vector3.up, cgf.BoxSize.y, 1f), cgf.transform.rotation, CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.y));
|
||||
sizeBoxValueY = DrawScaleValueHandle(sizeBoxValueY, GetVector(Vector3.down, cgf.BoxSize.y, 1f), cgf.transform.rotation, CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.y));
|
||||
sizeBoxValueX = DrawScaleValueHandle(sizeBoxValueX, GetVector(Vector3.left, cgf.BoxSize.x, 1f), cgf.transform.rotation, CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.x));
|
||||
sizeBoxValueX = DrawScaleValueHandle(sizeBoxValueX, GetVector(Vector3.right, cgf.BoxSize.x, 1f), cgf.transform.rotation, CGF_Editor.GetGismoSizeForBox(mainColor, gizmoSize, cgf.BoxSize.x));
|
||||
if (sizeBoxValueX < 0)
|
||||
cgf.BoxSize = new Vector3(0f, cgf.BoxSize.y);
|
||||
else
|
||||
cgf.BoxSize = new Vector3(sizeBoxValueX, cgf.BoxSize.y);
|
||||
if (sizeBoxValueY < 0)
|
||||
cgf.BoxSize = new Vector3(cgf.BoxSize.x, 0f);
|
||||
|
||||
else
|
||||
cgf.BoxSize = new Vector3(cgf.BoxSize.x, sizeBoxValueY);
|
||||
break;
|
||||
}
|
||||
|
||||
if (cgf._forcePositionProperties.ForcePosition == CGF.ForcePosition.ThisTransform)
|
||||
{
|
||||
DrawSphereCap(cgf.transform.position, cgf.transform.rotation, gizmoSize / 2f);
|
||||
}
|
||||
}
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
}
|
||||
|
||||
Vector3 GetVector(Vector3 vector, float size, float times)
|
||||
{
|
||||
return cgf.transform.position + (((cgf.transform.rotation * vector) * size) / times);
|
||||
}
|
||||
|
||||
void DrawConeCap(Vector3 position, Quaternion rotation, float gizmoSize)
|
||||
{
|
||||
#if (UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4 || UNITY_5_5)
|
||||
Handles.ConeCap(0, position, rotation, gizmoSize);
|
||||
#else
|
||||
if (Event.current.type == EventType.Repaint)
|
||||
{
|
||||
Handles.ConeHandleCap(0, position, rotation, gizmoSize, EventType.Repaint);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void DrawCircleCap(Vector3 position, Quaternion rotation, float gizmoSize)
|
||||
{
|
||||
#if (UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4 || UNITY_5_5)
|
||||
Handles.CircleCap(0, position, rotation, gizmoSize);
|
||||
#else
|
||||
if (Event.current.type == EventType.Repaint)
|
||||
{
|
||||
Handles.CircleHandleCap(0, position, rotation, gizmoSize, EventType.Repaint);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
float DrawScaleValueHandle(float value, Vector3 position, Quaternion rotation, float gizmoSize)
|
||||
{
|
||||
#if (UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4 || UNITY_5_5)
|
||||
return Handles.ScaleValueHandle(value, position, rotation, gizmoSize, Handles.DotCap, .25f);
|
||||
#else
|
||||
return Handles.ScaleValueHandle(value, position, rotation, gizmoSize, Handles.DotHandleCap, .25f);
|
||||
#endif
|
||||
}
|
||||
|
||||
void DrawSphereCap(Vector3 position, Quaternion rotation, float gizmoSize)
|
||||
{
|
||||
#if (UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4 || UNITY_5_5)
|
||||
Handles.SphereCap(0, position, rotation, gizmoSize / 2f);
|
||||
#else
|
||||
if (Event.current.type == EventType.Repaint)
|
||||
{
|
||||
Handles.SphereHandleCap(0, position, rotation, gizmoSize / 2f, EventType.Repaint);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
10
Assets/CircularGravityForce/Editor/CGF2D_Editor.cs.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c664f87bfb88a02498fa27a847c529ab
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1183
Assets/CircularGravityForce/Editor/CGF_Editor.cs
Normal file
10
Assets/CircularGravityForce/Editor/CGF_Editor.cs.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 262524a135e86564fa5beede005bfb6a
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
499
Assets/CircularGravityForce/Editor/CGF_Tool.cs
Normal file
|
@ -0,0 +1,499 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for adding CGF tool menu , menu context, and gameobejct items.
|
||||
*******************************************************************************************/
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.Collections;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
public class CGF_Tool : EditorWindow
|
||||
{
|
||||
#region Enumes
|
||||
|
||||
enum CGFOptions
|
||||
{
|
||||
_3D,
|
||||
_2D
|
||||
}
|
||||
|
||||
//Constructor
|
||||
public CGF_Tool()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region MenuItems / ToolBar
|
||||
|
||||
[MenuItem("GameObject/3D Object/CGF", false, 0)]
|
||||
public static void GameObject_3D_Object_CGF()
|
||||
{
|
||||
CreateSimpleCGF();
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/2D Object/CGF 2D", false, 0)]
|
||||
public static void GameObject_2D_Object_CGF()
|
||||
{
|
||||
CreateSimpleCGF2D();
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/CGF/Effects->Add 'AlignToForce'", false)]
|
||||
public static void AddAlignToForce(MenuCommand command)
|
||||
{
|
||||
CGF cgf = (CGF)command.context;
|
||||
cgf.gameObject.AddComponent<CGF_AlignToForce>();
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/CGF/Effects->Add 'NoGravity'", false)]
|
||||
public static void AddNoGravity(MenuCommand command)
|
||||
{
|
||||
CGF cgf = (CGF)command.context;
|
||||
cgf.gameObject.AddComponent<CGF_NoGravity>();
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/CGF/Mods->Add 'Pulse'", false)]
|
||||
public static void AddPulse(MenuCommand command)
|
||||
{
|
||||
CGF cgf = (CGF)command.context;
|
||||
cgf.gameObject.AddComponent<CGF_Pulse>();
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/CGF/Mods->Add 'SizeByRaycast'", false)]
|
||||
public static void AddSizeByRaycast(MenuCommand command)
|
||||
{
|
||||
CGF cgf = (CGF)command.context;
|
||||
cgf.gameObject.AddComponent<CGF_SizeByRaycast>();
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/CGF2D/Effects->Add 2D 'AlignToForce'", false)]
|
||||
public static void AddAlignToForce2D(MenuCommand command)
|
||||
{
|
||||
CGF2D cgf = (CGF2D)command.context;
|
||||
cgf.gameObject.AddComponent<CGF_AlignToForce2D>();
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/CGF2D/Effects->Add 2D 'NoGravity'", false)]
|
||||
public static void AddNoGravity2D(MenuCommand command)
|
||||
{
|
||||
CGF2D cgf = (CGF2D)command.context;
|
||||
cgf.gameObject.AddComponent<CGF_NoGravity2D>();
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/CGF2D/Mods->Add 2D 'Pulse'", false)]
|
||||
public static void AddPulse2D(MenuCommand command)
|
||||
{
|
||||
CGF2D cgf = (CGF2D)command.context;
|
||||
cgf.gameObject.AddComponent<CGF_Pulse2D>();
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/CGF2D/Mods->Add 2D 'SizeByRaycast'", false)]
|
||||
public static void AddSizeByRaycast2D(MenuCommand command)
|
||||
{
|
||||
CGF2D cgf = (CGF2D)command.context;
|
||||
cgf.gameObject.AddComponent<CGF_SizeByRaycast2D>();
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/CGF/Triggers->Add 'Enable'", false)]
|
||||
static void CONTEXT_CircularGravity_Create_Enable(MenuCommand command)
|
||||
{
|
||||
CGF cgf = (CGF)command.context;
|
||||
CreateEnableTrigger(cgf.gameObject, cgf);
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/CGF2D/Triggers->Add 2D 'Enable'", false)]
|
||||
static void CONTEXT_CircularGravity2D_Create_Enable(MenuCommand command)
|
||||
{
|
||||
CGF2D cgf = (CGF2D)command.context;
|
||||
CreateEnableTrigger2D(cgf.gameObject, cgf);
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/CGF/Triggers->Add 'Hover'", false)]
|
||||
static void CONTEXT_CircularGravity_Create_Hover(MenuCommand command)
|
||||
{
|
||||
CGF cgf = (CGF)command.context;
|
||||
CreateHoverTrigger(cgf.gameObject, cgf);
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/CGF2D/Triggers->Add 2D 'Hover'", false)]
|
||||
static void CONTEXT_CircularGravity2D_Create_Hover(MenuCommand command)
|
||||
{
|
||||
CGF2D cgf = (CGF2D)command.context;
|
||||
CreateHoverTrigger2D(cgf.gameObject, cgf);
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Quick CGF &q", false, 1)]
|
||||
public static void QuickCGF()
|
||||
{
|
||||
CreateSimpleCGF();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Quick CGF 2D #&q", false, 2)]
|
||||
public static void QuickCGF2D()
|
||||
{
|
||||
CreateSimpleCGF2D();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Effects/Add 'AlignToForce'", true)]
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Effects/Add 'NoGravity'", true)]
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Mods/Add 'Pulse'", true)]
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Mods/Add 'SizeByRaycast'", true)]
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Triggers/Add 'Enable'", true)]
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Triggers/Add 'Hover'", true)]
|
||||
public static bool CGF_Validation()
|
||||
{
|
||||
if (Selection.activeGameObject != null)
|
||||
{
|
||||
if (Selection.activeGameObject.GetComponent<CGF>() != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Effects/Add 2D 'AlignToForce'", true)]
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Effects/Add 2D 'NoGravity'", true)]
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Mods/Add 2D 'Pulse'", true)]
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Mods/Add 2D 'SizeByRaycast'", true)]
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Triggers/Add 2D 'Enable'", true)]
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Triggers/Add 2D 'Hover'", true)]
|
||||
public static bool CGF_Validation2D()
|
||||
{
|
||||
if (Selection.activeGameObject != null)
|
||||
{
|
||||
if (Selection.activeGameObject.GetComponent<CGF2D>() != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Effects/Add 'AlignToForce'", false)]
|
||||
public static void AddAlignToForce()
|
||||
{
|
||||
Selection.activeGameObject.AddComponent<CGF_AlignToForce>();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Effects/Add 'NoGravity'", false)]
|
||||
public static void AddNoGravity()
|
||||
{
|
||||
Selection.activeGameObject.AddComponent<CGF_NoGravity>();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Mods/Add 'Pulse'", false)]
|
||||
public static void AddPulse()
|
||||
{
|
||||
Selection.activeGameObject.AddComponent<CGF_Pulse>();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Mods/Add 'SizeByRaycast'", false)]
|
||||
public static void AddSizeByRaycast()
|
||||
{
|
||||
Selection.activeGameObject.AddComponent<CGF_SizeByRaycast>();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Effects/Add 2D 'AlignToForce'", false)]
|
||||
public static void AddAlignToForce2D()
|
||||
{
|
||||
Selection.activeGameObject.AddComponent<CGF_AlignToForce2D>();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Effects/Add 2D 'NoGravity'", false)]
|
||||
public static void AddNoGravity2D()
|
||||
{
|
||||
Selection.activeGameObject.AddComponent<CGF_NoGravity2D>();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Mods/Add 2D 'Pulse'", false)]
|
||||
public static void Add2DPulse()
|
||||
{
|
||||
Selection.activeGameObject.AddComponent<CGF_Pulse2D>();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Mods/Add 2D 'SizeByRaycast'", false)]
|
||||
public static void Add2DSizeByRaycast()
|
||||
{
|
||||
Selection.activeGameObject.AddComponent<CGF_SizeByRaycast2D>();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Triggers/Add 'Enable'", false)]
|
||||
public static void Trigger_AddEnable()
|
||||
{
|
||||
bool isCreated = false;
|
||||
|
||||
if (Selection.activeGameObject != null)
|
||||
{
|
||||
var selectedObject = Selection.activeGameObject;
|
||||
|
||||
if (selectedObject.GetComponent<CGF>() != null)
|
||||
{
|
||||
var cgf = selectedObject;
|
||||
var circularGravity = selectedObject.GetComponent<CGF>();
|
||||
|
||||
CreateEnableTrigger(cgf, circularGravity);
|
||||
|
||||
isCreated = true;
|
||||
}
|
||||
}
|
||||
if (!isCreated)
|
||||
{
|
||||
var cgf = CreateSimpleCGF();
|
||||
CreateEnableTrigger(cgf, cgf.GetComponent<CGF>());
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Triggers/Add 'Hover'", false)]
|
||||
public static void Trigger_AddHover()
|
||||
{
|
||||
bool isCreated = false;
|
||||
|
||||
if (Selection.activeGameObject != null)
|
||||
{
|
||||
var selectedObject = Selection.activeGameObject;
|
||||
|
||||
if (selectedObject.GetComponent<CGF>() != null)
|
||||
{
|
||||
var cgf = selectedObject;
|
||||
var circularGravity = selectedObject.GetComponent<CGF>();
|
||||
|
||||
CreateHoverTrigger(cgf, circularGravity);
|
||||
|
||||
isCreated = true;
|
||||
}
|
||||
}
|
||||
if (!isCreated)
|
||||
{
|
||||
var cgf = CreateSimpleCGF();
|
||||
CreateHoverTrigger(cgf, cgf.GetComponent<CGF>());
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Triggers/Add 2D 'Enable'", false)]
|
||||
public static void Trigger2D_AddEnable()
|
||||
{
|
||||
bool isCreated = false;
|
||||
|
||||
if (Selection.activeGameObject != null)
|
||||
{
|
||||
var selectedObject = Selection.activeGameObject;
|
||||
|
||||
if (selectedObject.GetComponent<CGF2D>() != null)
|
||||
{
|
||||
var cgf = selectedObject;
|
||||
var circularGravity = selectedObject.GetComponent<CGF2D>();
|
||||
|
||||
CreateEnableTrigger2D(cgf, circularGravity);
|
||||
|
||||
isCreated = true;
|
||||
}
|
||||
}
|
||||
if (!isCreated)
|
||||
{
|
||||
var cgf = CreateSimpleCGF2D();
|
||||
CreateEnableTrigger2D(cgf, cgf.GetComponent<CGF2D>());
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Triggers/Add 2D 'Hover'", false)]
|
||||
public static void Trigger2D_AddHover()
|
||||
{
|
||||
bool isCreated = false;
|
||||
|
||||
if (Selection.activeGameObject != null)
|
||||
{
|
||||
var selectedObject = Selection.activeGameObject;
|
||||
|
||||
if (selectedObject.GetComponent<CGF2D>() != null)
|
||||
{
|
||||
var cgf = selectedObject;
|
||||
var circularGravity = selectedObject.GetComponent<CGF2D>();
|
||||
|
||||
CreateHoverTrigger2D(cgf, circularGravity);
|
||||
|
||||
isCreated = true;
|
||||
}
|
||||
}
|
||||
if (!isCreated)
|
||||
{
|
||||
var cgf = CreateSimpleCGF2D();
|
||||
CreateHoverTrigger2D(cgf, cgf.GetComponent<CGF2D>());
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Support/Unity Form", false)]
|
||||
public static void SupportUnityForm()
|
||||
{
|
||||
Application.OpenURL("http://forum.unity3d.com/threads/circular-gravity-force.217100/");
|
||||
}
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Support/Manual", false)]
|
||||
public static void SupportManual()
|
||||
{
|
||||
Application.OpenURL("https://www.resurgamstudios.com/cgf-manual");
|
||||
}
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Support/Asset Store", false)]
|
||||
public static void SupportAssetStore()
|
||||
{
|
||||
Application.OpenURL("https://www.assetstore.unity3d.com/#!/content/8181");
|
||||
}
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Support/Website", false)]
|
||||
public static void SupportWebsite()
|
||||
{
|
||||
Application.OpenURL("https://www.resurgamstudios.com/cgf");
|
||||
}
|
||||
[MenuItem("Tools/Resurgam Studios/CGF/Support/Version History", false)]
|
||||
public static void SupportVersionHistory()
|
||||
{
|
||||
Application.OpenURL("https://www.resurgamstudios.com/cgf-versionhistory");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
|
||||
private static GameObject CreateSimpleCGF()
|
||||
{
|
||||
var cgf = CGF.CreateCGF();
|
||||
|
||||
FocusGameObject(cgf);
|
||||
|
||||
return cgf;
|
||||
}
|
||||
private static GameObject CreateSimpleCGF2D()
|
||||
{
|
||||
var cgf = CGF2D.CreateCGF();
|
||||
|
||||
FocusGameObject(cgf, true);
|
||||
|
||||
return cgf;
|
||||
}
|
||||
|
||||
private static void CreateEnableTrigger(GameObject cgf = null, CGF circularGravity = null)
|
||||
{
|
||||
GameObject triggerEnableObj = new GameObject();
|
||||
triggerEnableObj.name = "Trigger Enable";
|
||||
if (circularGravity != null)
|
||||
{
|
||||
triggerEnableObj.AddComponent<CGF_EnableTrigger>().Cgf = circularGravity;
|
||||
}
|
||||
else
|
||||
{
|
||||
triggerEnableObj.AddComponent<CGF_EnableTrigger>();
|
||||
}
|
||||
if (cgf != null)
|
||||
{
|
||||
triggerEnableObj.transform.SetParent(cgf.transform, false);
|
||||
}
|
||||
triggerEnableObj.transform.position = triggerEnableObj.transform.position + Vector3.right * 6f;
|
||||
triggerEnableObj.transform.rotation = Quaternion.Euler(0, 90, 0);
|
||||
|
||||
if (cgf == null)
|
||||
{
|
||||
FocusGameObject(triggerEnableObj);
|
||||
}
|
||||
}
|
||||
|
||||
private static void CreateHoverTrigger(GameObject cgf = null, CGF circularGravity = null)
|
||||
{
|
||||
GameObject triggerEnableObj = new GameObject();
|
||||
triggerEnableObj.name = "Trigger Hover";
|
||||
if (circularGravity != null)
|
||||
{
|
||||
triggerEnableObj.AddComponent<CGF_HoverTrigger>().Cgf = circularGravity;
|
||||
}
|
||||
else
|
||||
{
|
||||
triggerEnableObj.AddComponent<CGF_HoverTrigger>();
|
||||
}
|
||||
if (cgf != null)
|
||||
{
|
||||
triggerEnableObj.transform.SetParent(cgf.transform, false);
|
||||
}
|
||||
triggerEnableObj.transform.position = triggerEnableObj.transform.position + Vector3.left * 6f;
|
||||
triggerEnableObj.transform.rotation = Quaternion.Euler(-180, 0, 0);
|
||||
|
||||
if (cgf == null)
|
||||
{
|
||||
FocusGameObject(triggerEnableObj);
|
||||
}
|
||||
}
|
||||
|
||||
private static void CreateEnableTrigger2D(GameObject cgf = null, CGF2D circularGravity = null)
|
||||
{
|
||||
GameObject triggerEnableObj = new GameObject();
|
||||
triggerEnableObj.name = "Trigger Enable";
|
||||
if (circularGravity != null)
|
||||
{
|
||||
triggerEnableObj.AddComponent<CGF_EnableTrigger2D>().Cgf = circularGravity;
|
||||
}
|
||||
else
|
||||
{
|
||||
triggerEnableObj.AddComponent<CGF_EnableTrigger2D>();
|
||||
}
|
||||
if (cgf != null)
|
||||
{
|
||||
triggerEnableObj.transform.SetParent(cgf.transform, false);
|
||||
}
|
||||
triggerEnableObj.transform.position = triggerEnableObj.transform.position + new Vector3(0, 6f);
|
||||
|
||||
if (cgf == null)
|
||||
{
|
||||
FocusGameObject(triggerEnableObj, true);
|
||||
}
|
||||
}
|
||||
|
||||
private static void CreateHoverTrigger2D(GameObject cgf = null, CGF2D circularGravity = null)
|
||||
{
|
||||
GameObject triggerEnableObj = new GameObject();
|
||||
triggerEnableObj.name = "Trigger Hover";
|
||||
if (circularGravity != null)
|
||||
{
|
||||
triggerEnableObj.AddComponent<CGF_HoverTrigger2D>().Cgf = circularGravity;
|
||||
}
|
||||
else
|
||||
{
|
||||
triggerEnableObj.AddComponent<CGF_HoverTrigger2D>();
|
||||
}
|
||||
if (cgf != null)
|
||||
{
|
||||
triggerEnableObj.transform.SetParent(cgf.transform, false);
|
||||
}
|
||||
triggerEnableObj.transform.position = triggerEnableObj.transform.position + new Vector3(0, -6f);
|
||||
triggerEnableObj.transform.rotation = Quaternion.Euler(0, 0, 180f);
|
||||
|
||||
if (cgf == null)
|
||||
{
|
||||
FocusGameObject(triggerEnableObj, true);
|
||||
}
|
||||
}
|
||||
|
||||
private static void FocusGameObject(GameObject focusGameObject, bool in2D = false)
|
||||
{
|
||||
//Sets the create location for the Circular Gravity Force gameobject
|
||||
if (SceneView.lastActiveSceneView != null)
|
||||
{
|
||||
if (in2D)
|
||||
focusGameObject.transform.position = new Vector3(SceneView.lastActiveSceneView.pivot.x, SceneView.lastActiveSceneView.pivot.y, 0f);
|
||||
else
|
||||
focusGameObject.transform.position = SceneView.lastActiveSceneView.pivot;
|
||||
|
||||
//Sets the Circular Gravity Force gameobject selected in the hierarchy
|
||||
Selection.activeGameObject = focusGameObject;
|
||||
|
||||
//focus the editor camera on the Circular Gravity Force gameobject
|
||||
SceneView.lastActiveSceneView.FrameSelected();
|
||||
}
|
||||
else
|
||||
{
|
||||
focusGameObject.transform.position = Vector3.zero;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
10
Assets/CircularGravityForce/Editor/CGF_Tool.cs.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 76c0ddc61c70c0e41995cf2975fdeb6a
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
5
Assets/CircularGravityForce/Effects.meta
Normal file
|
@ -0,0 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: deed9b00ca452614196a9a92746a28ee
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
214
Assets/CircularGravityForce/Effects/CGF_AlignToForce.cs
Normal file
|
@ -0,0 +1,214 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for cgf effects, enables align to force effect.
|
||||
*******************************************************************************************/
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
[RequireComponent(typeof(CGF))]
|
||||
public class CGF_AlignToForce : MonoBehaviour
|
||||
{
|
||||
#region Events
|
||||
|
||||
public delegate void ApplyAlignToForceEvent(CGF cgf, Rigidbody rigid, Collider coll, Vector3 transPos);
|
||||
public static event ApplyAlignToForceEvent OnApplyAlignToForceEvent;
|
||||
|
||||
#endregion
|
||||
|
||||
public enum AlignDirection
|
||||
{
|
||||
Up,
|
||||
Down,
|
||||
Left,
|
||||
Right,
|
||||
Forward,
|
||||
Backward
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Enables align to force.")]
|
||||
private bool enable = true;
|
||||
public bool Enable
|
||||
{
|
||||
get { return enable; }
|
||||
set { enable = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("If alignToForce is enabled, lets you pick the align direction of the GameObjects.")]
|
||||
private AlignDirection alignDirection = AlignDirection.Down;
|
||||
public AlignDirection _alignDirection
|
||||
{
|
||||
get { return alignDirection; }
|
||||
set { alignDirection = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Rotation speed.")]
|
||||
private float rotateSpeed = 1f;
|
||||
public float RotateSpeed
|
||||
{
|
||||
get { return rotateSpeed; }
|
||||
set { rotateSpeed = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("The maximimum angular velocity of the rigidbody.")]
|
||||
private float maxAngularVelocity = 7f;
|
||||
public float MaxAngularVelocity
|
||||
{
|
||||
get { return maxAngularVelocity; }
|
||||
set { maxAngularVelocity = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Angular velocity damping.")]
|
||||
private float angularVelocityDamping = 1f;
|
||||
public float AngularVelocityDamping
|
||||
{
|
||||
get { return angularVelocityDamping; }
|
||||
set { angularVelocityDamping = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Use closest collider height offset.")]
|
||||
private bool useClosestColliderHeightOffset = false;
|
||||
public bool UseClosestColliderHeightOffset
|
||||
{
|
||||
get { return useClosestColliderHeightOffset; }
|
||||
set { useClosestColliderHeightOffset = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Filter properties options.")]
|
||||
private CGF.FilterProperties filterProperties;
|
||||
public CGF.FilterProperties _filterProperties
|
||||
{
|
||||
get { return filterProperties; }
|
||||
set { filterProperties = value; }
|
||||
}
|
||||
|
||||
private CGF cgf;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
CGF.OnApplyCGFEvent += CGF_OnApplyCGFEvent;
|
||||
|
||||
cgf = this.GetComponent<CGF>();
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
CGF.OnApplyCGFEvent -= CGF_OnApplyCGFEvent;
|
||||
}
|
||||
|
||||
private void CGF_OnApplyCGFEvent(CGF cgf, Rigidbody rigid, Collider coll)
|
||||
{
|
||||
if (this.cgf == cgf)
|
||||
{
|
||||
ApplyAlignment(cgf, rigid, coll);
|
||||
}
|
||||
}
|
||||
|
||||
//Applys the alignment
|
||||
private void ApplyAlignment(CGF cgf, Rigidbody rigid, Collider coll)
|
||||
{
|
||||
if (_filterProperties == null)
|
||||
return;
|
||||
|
||||
if (Enable)
|
||||
{
|
||||
if (_filterProperties.ValidateFilters(rigid, coll))
|
||||
{
|
||||
var transPos = this.transform.position;
|
||||
|
||||
switch (cgf._forcePositionProperties.ForcePosition)
|
||||
{
|
||||
case CGF.ForcePosition.ThisTransform:
|
||||
break;
|
||||
case CGF.ForcePosition.ClosestCollider:
|
||||
if (cgf._forcePositionProperties.ClosestColliders != null)
|
||||
{
|
||||
if (cgf._forcePositionProperties.ClosestColliders.Count > 0)
|
||||
{
|
||||
float heightOffset = 0f;
|
||||
|
||||
if (UseClosestColliderHeightOffset)
|
||||
heightOffset = cgf._forcePositionProperties.HeightOffset;
|
||||
|
||||
if (!cgf._forcePositionProperties.UseEffectedClosestPoint)
|
||||
{
|
||||
var point = cgf.FindClosestPoints(rigid.position, cgf._forcePositionProperties.ClosestColliders);
|
||||
|
||||
transPos = cgf.GetVectorHeightOffset(point, rigid.position, heightOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector3 pointA = cgf.FindClosestPoints(coll.transform.position, cgf._forcePositionProperties.ClosestColliders);
|
||||
Vector3 pointB = cgf.FindClosestPoints(pointA, coll);
|
||||
|
||||
float distanceThisA = Vector3.Distance(coll.transform.position, pointA);
|
||||
float distanceAB = Vector3.Distance(pointA, pointB);
|
||||
|
||||
transPos = cgf.GetVectorHeightOffset(pointA, coll.transform.position, Mathf.Abs(distanceThisA - distanceAB) + heightOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Vector3 newLocal = Vector3.zero;
|
||||
|
||||
switch (_alignDirection)
|
||||
{
|
||||
case AlignDirection.Up:
|
||||
newLocal = -rigid.transform.up;
|
||||
break;
|
||||
case AlignDirection.Down:
|
||||
newLocal = rigid.transform.up;
|
||||
break;
|
||||
case AlignDirection.Left:
|
||||
newLocal = rigid.transform.right;
|
||||
break;
|
||||
case AlignDirection.Right:
|
||||
newLocal = -rigid.transform.right;
|
||||
break;
|
||||
case AlignDirection.Forward:
|
||||
newLocal = -rigid.transform.forward;
|
||||
break;
|
||||
case AlignDirection.Backward:
|
||||
newLocal = rigid.transform.forward;
|
||||
break;
|
||||
}
|
||||
|
||||
Quaternion targetRotation = Quaternion.FromToRotation(newLocal, rigid.position - transPos) * rigid.rotation;
|
||||
|
||||
Quaternion deltaRotation = Quaternion.Inverse(rigid.rotation) * targetRotation;
|
||||
Vector3 deltaAngles = GetRelativeAngles(deltaRotation.eulerAngles);
|
||||
Vector3 worldDeltaAngles = rigid.transform.TransformDirection(deltaAngles);
|
||||
|
||||
rigid.maxAngularVelocity = MaxAngularVelocity;
|
||||
rigid.AddTorque((RotateSpeed * worldDeltaAngles) - ((AngularVelocityDamping * rigid.angularVelocity)));
|
||||
|
||||
if (OnApplyAlignToForceEvent != null)
|
||||
{
|
||||
OnApplyAlignToForceEvent.Invoke(cgf, rigid, coll, transPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Convert angles above 180 degrees into negative/relative angles
|
||||
Vector3 GetRelativeAngles(Vector3 angles)
|
||||
{
|
||||
Vector3 relativeAngles = angles;
|
||||
if (relativeAngles.x > 180f)
|
||||
relativeAngles.x -= 360f;
|
||||
if (relativeAngles.y > 180f)
|
||||
relativeAngles.y -= 360f;
|
||||
if (relativeAngles.z > 180f)
|
||||
relativeAngles.z -= 360f;
|
||||
|
||||
return relativeAngles;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7b97dcb9fd140874d8c8d4d10c860a77
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: 1e3a9531e1ba07546b9638ba70b6e081, type: 3}
|
||||
userData:
|
200
Assets/CircularGravityForce/Effects/CGF_AlignToForce2D.cs
Normal file
|
@ -0,0 +1,200 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for cgf effects, enables align to force effect.
|
||||
*******************************************************************************************/
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
[RequireComponent(typeof(CGF2D))]
|
||||
public class CGF_AlignToForce2D : MonoBehaviour
|
||||
{
|
||||
#region Events
|
||||
|
||||
public delegate void ApplyAlignToForceEvent(CGF2D cgf, Rigidbody2D rigid, Collider2D coll, Vector3 transPos);
|
||||
public static event ApplyAlignToForceEvent OnApplyAlignToForceEvent;
|
||||
|
||||
#endregion
|
||||
|
||||
public enum AlignDirection
|
||||
{
|
||||
Up,
|
||||
Down,
|
||||
Left,
|
||||
Right
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Enables align to force.")]
|
||||
private bool enable = true;
|
||||
public bool Enable
|
||||
{
|
||||
get { return enable; }
|
||||
set { enable = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("If alignToForce is enabled, lets you pick the align direction of the GameObjects.")]
|
||||
private AlignDirection alignDirection = AlignDirection.Down;
|
||||
public AlignDirection _alignDirection
|
||||
{
|
||||
get { return alignDirection; }
|
||||
set { alignDirection = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Rotation speed.")]
|
||||
private float rotateSpeed = 1f;
|
||||
public float RotateSpeed
|
||||
{
|
||||
get { return rotateSpeed; }
|
||||
set { rotateSpeed = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Angular velocity damping.")]
|
||||
private float angularVelocityDamping = 0.1f;
|
||||
public float AngularVelocityDamping
|
||||
{
|
||||
get { return angularVelocityDamping; }
|
||||
set { angularVelocityDamping = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Use closest collider height offset.")]
|
||||
private bool useClosestColliderHeightOffset = false;
|
||||
public bool UseClosestColliderHeightOffset
|
||||
{
|
||||
get { return useClosestColliderHeightOffset; }
|
||||
set { useClosestColliderHeightOffset = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Filter properties options.")]
|
||||
private CGF2D.FilterProperties filterProperties;
|
||||
public CGF2D.FilterProperties _filterProperties
|
||||
{
|
||||
get { return filterProperties; }
|
||||
set { filterProperties = value; }
|
||||
}
|
||||
|
||||
private CGF2D cgf;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
CGF2D.OnApplyCGFEvent += CGF_OnApplyCGFEvent;
|
||||
|
||||
cgf = this.GetComponent<CGF2D>();
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
CGF2D.OnApplyCGFEvent -= CGF_OnApplyCGFEvent;
|
||||
}
|
||||
|
||||
private void CGF_OnApplyCGFEvent(CGF2D cgf, Rigidbody2D rigid, Collider2D coll)
|
||||
{
|
||||
if (this.cgf == cgf)
|
||||
{
|
||||
ApplyAlignment(cgf, rigid, coll);
|
||||
}
|
||||
}
|
||||
|
||||
//Applys the alignment
|
||||
private void ApplyAlignment(CGF2D cgf, Rigidbody2D rigid, Collider2D coll)
|
||||
{
|
||||
if (_filterProperties == null)
|
||||
return;
|
||||
|
||||
if (Enable)
|
||||
{
|
||||
if (_filterProperties.ValidateFilters(rigid, coll))
|
||||
{
|
||||
var transPos = this.transform.position;
|
||||
|
||||
switch (cgf._forcePositionProperties.ForcePosition)
|
||||
{
|
||||
case CGF.ForcePosition.ThisTransform:
|
||||
break;
|
||||
case CGF.ForcePosition.ClosestCollider:
|
||||
if (cgf._forcePositionProperties.ClosestColliders != null)
|
||||
{
|
||||
if (cgf._forcePositionProperties.ClosestColliders.Count > 0)
|
||||
{
|
||||
float heightOffset = 0f;
|
||||
|
||||
if (UseClosestColliderHeightOffset)
|
||||
heightOffset = cgf._forcePositionProperties.HeightOffset;
|
||||
|
||||
if (!cgf._forcePositionProperties.UseEffectedClosestPoint)
|
||||
{
|
||||
var point = cgf.FindClosestPoints(coll, cgf._forcePositionProperties.ClosestColliders, false);
|
||||
transPos = cgf.GetVectorHeightOffset(point, coll.transform.position, heightOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector3 pointA = cgf.FindClosestPoints(coll, cgf._forcePositionProperties.ClosestColliders, false);
|
||||
Vector3 pointB = cgf.FindClosestPoints(coll, cgf._forcePositionProperties.ClosestColliders, true);
|
||||
|
||||
float distanceThisA = Vector3.Distance(coll.transform.position, pointA);
|
||||
float distanceAB = Vector3.Distance(pointA, pointB);
|
||||
|
||||
transPos = cgf.GetVectorHeightOffset(pointA, coll.transform.position, Mathf.Abs(distanceThisA - distanceAB) + heightOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Vector3 newLocal = Vector3.zero;
|
||||
|
||||
switch (_alignDirection)
|
||||
{
|
||||
case AlignDirection.Up:
|
||||
newLocal = rigid.transform.up;
|
||||
break;
|
||||
case AlignDirection.Down:
|
||||
newLocal = -rigid.transform.up;
|
||||
break;
|
||||
case AlignDirection.Left:
|
||||
newLocal = -rigid.transform.right;
|
||||
break;
|
||||
case AlignDirection.Right:
|
||||
newLocal = rigid.transform.right;
|
||||
break;
|
||||
}
|
||||
|
||||
float angle = LookAtAngle(rigid, newLocal, transPos);
|
||||
|
||||
rigid.AddTorque((RotateSpeed * angle) - ((rigid.angularVelocity * AngularVelocityDamping) * Time.deltaTime));
|
||||
|
||||
if (OnApplyAlignToForceEvent != null)
|
||||
{
|
||||
OnApplyAlignToForceEvent.Invoke(cgf, rigid, coll, transPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float LookAtAngle(Rigidbody2D rigid2D, Vector3 alignDirection, Vector3 target)
|
||||
{
|
||||
int turnTo = 0;
|
||||
|
||||
Vector3 angleRelativeToMe = target - rigid2D.transform.position;
|
||||
|
||||
//float angleDiff = Vector3.Angle(alignDirection, angleRelativeToMe);
|
||||
|
||||
Vector3 cross = Vector3.Cross(alignDirection, angleRelativeToMe);
|
||||
|
||||
if (cross.z < 0)
|
||||
{
|
||||
turnTo = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
turnTo = 1;
|
||||
}
|
||||
|
||||
return turnTo;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 980839e152c5c9549a015c016acc649e
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: 1e3a9531e1ba07546b9638ba70b6e081, type: 3}
|
||||
userData:
|
108
Assets/CircularGravityForce/Effects/CGF_NoGravity.cs
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for cgf effects, enables no gravity effect.
|
||||
*******************************************************************************************/
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
[RequireComponent(typeof(CGF))]
|
||||
public class CGF_NoGravity : MonoBehaviour
|
||||
{
|
||||
public class OnGravity_CGFCollection : CGFCollection
|
||||
{
|
||||
public override void UpdateEffectedObject(Rigidbody rigid)
|
||||
{
|
||||
base.UpdateEffectedObject(rigid);
|
||||
|
||||
rigid.useGravity = false;
|
||||
}
|
||||
|
||||
public override void ResetEffectedObject(EffectedObject effectedObject)
|
||||
{
|
||||
base.ResetEffectedObject(effectedObject);
|
||||
|
||||
effectedObject._rigidbody.useGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Enables no gravity.")]
|
||||
private bool enable = true;
|
||||
public bool Enable
|
||||
{
|
||||
get { return enable; }
|
||||
set { enable = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("")]
|
||||
private float timeEffected = 3f;
|
||||
public float TimeEffected
|
||||
{
|
||||
get { return timeEffected; }
|
||||
set { timeEffected = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Filter properties options.")]
|
||||
private CGF.FilterProperties filterProperties;
|
||||
public CGF.FilterProperties _filterProperties
|
||||
{
|
||||
get { return filterProperties; }
|
||||
set { filterProperties = value; }
|
||||
}
|
||||
|
||||
private OnGravity_CGFCollection cgfCollection;
|
||||
public OnGravity_CGFCollection _cgfCollection
|
||||
{
|
||||
get { return cgfCollection; }
|
||||
set { cgfCollection = value; }
|
||||
}
|
||||
|
||||
private CGF cgf;
|
||||
|
||||
public CGF_NoGravity()
|
||||
{
|
||||
_cgfCollection = new OnGravity_CGFCollection();
|
||||
}
|
||||
|
||||
void Awake()
|
||||
{
|
||||
CGF.OnApplyCGFEvent += CGF_OnApplyCGFEvent;
|
||||
|
||||
cgf = this.GetComponent<CGF>();
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
CGF.OnApplyCGFEvent -= CGF_OnApplyCGFEvent;
|
||||
}
|
||||
|
||||
private void CGF_OnApplyCGFEvent(CGF cgf, Rigidbody rigid, Collider coll)
|
||||
{
|
||||
if (_filterProperties == null)
|
||||
return;
|
||||
|
||||
if (Enable)
|
||||
{
|
||||
if (this.cgf == cgf)
|
||||
{
|
||||
if (_filterProperties != null)
|
||||
{
|
||||
if (_filterProperties.ValidateFilters(rigid, coll))
|
||||
{
|
||||
_cgfCollection.Add(rigid, Time.time, TimeEffected);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
_cgfCollection.Sync();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8356fb58bf8a8e74ca3648eca7e3bb16
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: c64924503c2c73b46b95b9c79d1d3dd6, type: 3}
|
||||
userData:
|
108
Assets/CircularGravityForce/Effects/CGF_NoGravity2D.cs
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for cgf effects, enables no gravity effect.
|
||||
*******************************************************************************************/
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
[RequireComponent(typeof(CGF2D))]
|
||||
public class CGF_NoGravity2D : MonoBehaviour
|
||||
{
|
||||
public class OnGravity_CGFCollection : CGFCollection2D
|
||||
{
|
||||
public override void UpdateEffectedObject(Rigidbody2D rigid)
|
||||
{
|
||||
base.UpdateEffectedObject(rigid);
|
||||
|
||||
rigid.gravityScale = 0f;
|
||||
}
|
||||
|
||||
public override void ResetEffectedObject(EffectedObject effectedObject)
|
||||
{
|
||||
base.ResetEffectedObject(effectedObject);
|
||||
|
||||
effectedObject._rigidbody.gravityScale = 1f;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Enables no gravity.")]
|
||||
private bool enable = true;
|
||||
public bool Enable
|
||||
{
|
||||
get { return enable; }
|
||||
set { enable = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("")]
|
||||
private float timeEffected = 3f;
|
||||
public float TimeEffected
|
||||
{
|
||||
get { return timeEffected; }
|
||||
set { timeEffected = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Filter properties options.")]
|
||||
private CGF2D.FilterProperties filterProperties;
|
||||
public CGF2D.FilterProperties _filterProperties
|
||||
{
|
||||
get { return filterProperties; }
|
||||
set { filterProperties = value; }
|
||||
}
|
||||
|
||||
private OnGravity_CGFCollection cgfCollection;
|
||||
public OnGravity_CGFCollection _cgfCollection
|
||||
{
|
||||
get { return cgfCollection; }
|
||||
set { cgfCollection = value; }
|
||||
}
|
||||
|
||||
private CGF2D cgf;
|
||||
|
||||
public CGF_NoGravity2D()
|
||||
{
|
||||
_cgfCollection = new OnGravity_CGFCollection();
|
||||
}
|
||||
|
||||
void Awake()
|
||||
{
|
||||
CGF2D.OnApplyCGFEvent += CGF_OnApplyCGFEvent;
|
||||
|
||||
cgf = this.GetComponent<CGF2D>();
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
CGF2D.OnApplyCGFEvent -= CGF_OnApplyCGFEvent;
|
||||
}
|
||||
|
||||
private void CGF_OnApplyCGFEvent(CGF2D cgf, Rigidbody2D rigid, Collider2D coll)
|
||||
{
|
||||
if (_filterProperties == null)
|
||||
return;
|
||||
|
||||
if (Enable)
|
||||
{
|
||||
if (this.cgf == cgf)
|
||||
{
|
||||
if (_filterProperties != null)
|
||||
{
|
||||
if (_filterProperties.ValidateFilters(rigid, coll))
|
||||
{
|
||||
_cgfCollection.Add(rigid, Time.time, TimeEffected);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
_cgfCollection.Sync();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f5cec0f401a4a1d4db197093167dc447
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: c64924503c2c73b46b95b9c79d1d3dd6, type: 3}
|
||||
userData:
|
9
Assets/CircularGravityForce/Mods.meta
Normal file
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a769c8fffb320d84f957d20e13604edf
|
||||
folderAsset: yes
|
||||
timeCreated: 1455067499
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
208
Assets/CircularGravityForce/Mods/CGF_Pulse.cs
Normal file
|
@ -0,0 +1,208 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for cgf mod, creates a pulse effect using the cgf.
|
||||
*******************************************************************************************/
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
[RequireComponent(typeof(CGF))]
|
||||
public class CGF_Pulse : MonoBehaviour
|
||||
{
|
||||
#region Classis
|
||||
|
||||
//Pulse properties
|
||||
[System.Serializable]
|
||||
public class PulseProperties
|
||||
{
|
||||
[SerializeField, Tooltip("Enable/Disable's the pulse.")]
|
||||
private bool pulse = true;
|
||||
public bool Pulse
|
||||
{
|
||||
get { return pulse; }
|
||||
set { pulse = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Speed of the pulse.")]
|
||||
private float speed = 10f;
|
||||
public float Speed
|
||||
{
|
||||
get { return speed; }
|
||||
set { speed = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Min pulse size.")]
|
||||
private float minSize = 1f;
|
||||
public float MinSize
|
||||
{
|
||||
get { return minSize; }
|
||||
set { MinSize = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Max pulse size.")]
|
||||
private float maxSize = 5f;
|
||||
public float MaxSize
|
||||
{
|
||||
get { return maxSize; }
|
||||
set { maxSize = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Min pulse box size.")]
|
||||
private Vector3 minBoxSize = Vector3.one;
|
||||
public Vector3 MinBoxSize
|
||||
{
|
||||
get { return minBoxSize; }
|
||||
set { minBoxSize = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Max pulse box size.")]
|
||||
private Vector3 maxBoxSize = Vector3.one * 5f;
|
||||
public Vector3 MaxBoxSize
|
||||
{
|
||||
get { return maxBoxSize; }
|
||||
set { maxBoxSize = value; }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties/Constructor
|
||||
|
||||
[SerializeField, Tooltip("Pulse properties.")]
|
||||
private PulseProperties pulseProperties;
|
||||
public PulseProperties _pulseProperties
|
||||
{
|
||||
get { return pulseProperties; }
|
||||
set { pulseProperties = value; }
|
||||
}
|
||||
|
||||
private CGF cgf;
|
||||
|
||||
//Used to tell whether to add or subtract to pulse
|
||||
private bool pulse_Positive;
|
||||
private bool pulse_PositiveBoxX;
|
||||
private bool pulse_PositiveBoxY;
|
||||
private bool pulse_PositiveBoxZ;
|
||||
|
||||
public CGF_Pulse()
|
||||
{
|
||||
_pulseProperties = new PulseProperties();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity Functions
|
||||
|
||||
void Start()
|
||||
{
|
||||
cgf = this.GetComponent<CGF>();
|
||||
|
||||
//Sets up pulse
|
||||
if (_pulseProperties.Pulse)
|
||||
{
|
||||
cgf.Size = _pulseProperties.MinSize;
|
||||
pulse_Positive = true;
|
||||
pulse_PositiveBoxX = true;
|
||||
pulse_PositiveBoxY = true;
|
||||
pulse_PositiveBoxZ = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (cgf.Enable)
|
||||
{
|
||||
if (_pulseProperties.Pulse)
|
||||
{
|
||||
CalculatePulse();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Functions
|
||||
|
||||
//Calculatie the given pulse
|
||||
void CalculatePulse()
|
||||
{
|
||||
if (_pulseProperties.Pulse)
|
||||
{
|
||||
if (cgf._shape != CGF.Shape.Box)
|
||||
CalculatePulseBySize();
|
||||
else
|
||||
CalculatePulseByBoxSize();
|
||||
}
|
||||
}
|
||||
|
||||
void CalculatePulseBySize()
|
||||
{
|
||||
if (pulse_Positive)
|
||||
{
|
||||
if (cgf.Size <= _pulseProperties.MaxSize)
|
||||
cgf.Size = cgf.Size + (_pulseProperties.Speed * Time.deltaTime);
|
||||
else
|
||||
pulse_Positive = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cgf.Size >= _pulseProperties.MinSize)
|
||||
cgf.Size = cgf.Size - (_pulseProperties.Speed * Time.deltaTime);
|
||||
else
|
||||
pulse_Positive = true;
|
||||
}
|
||||
}
|
||||
|
||||
void CalculatePulseByBoxSize()
|
||||
{
|
||||
if (pulse_PositiveBoxX)
|
||||
{
|
||||
if (cgf.BoxSize.x <= _pulseProperties.MaxBoxSize.x)
|
||||
cgf.BoxSize = new Vector3(cgf.BoxSize.x + (_pulseProperties.Speed * Time.deltaTime), cgf.BoxSize.y, cgf.BoxSize.z);
|
||||
else
|
||||
pulse_PositiveBoxX = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cgf.BoxSize.x >= _pulseProperties.MinBoxSize.x)
|
||||
cgf.BoxSize = new Vector3(cgf.BoxSize.x - (_pulseProperties.Speed * Time.deltaTime), cgf.BoxSize.y, cgf.BoxSize.z);
|
||||
else
|
||||
pulse_PositiveBoxX = true;
|
||||
}
|
||||
|
||||
if (pulse_PositiveBoxY)
|
||||
{
|
||||
if (cgf.BoxSize.y <= _pulseProperties.MaxBoxSize.y)
|
||||
cgf.BoxSize = new Vector3(cgf.BoxSize.x, cgf.BoxSize.y + (_pulseProperties.Speed * Time.deltaTime), cgf.BoxSize.z);
|
||||
else
|
||||
pulse_PositiveBoxY = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cgf.BoxSize.y >= _pulseProperties.MinBoxSize.y)
|
||||
cgf.BoxSize = new Vector3(cgf.BoxSize.x, cgf.BoxSize.y - (_pulseProperties.Speed * Time.deltaTime), cgf.BoxSize.z);
|
||||
else
|
||||
pulse_PositiveBoxY = true;
|
||||
}
|
||||
|
||||
if (pulse_PositiveBoxZ)
|
||||
{
|
||||
if (cgf.BoxSize.z <= _pulseProperties.MaxBoxSize.z)
|
||||
cgf.BoxSize = new Vector3(cgf.BoxSize.x, cgf.BoxSize.y, cgf.BoxSize.z + (_pulseProperties.Speed * Time.deltaTime));
|
||||
else
|
||||
pulse_PositiveBoxZ = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cgf.BoxSize.z >= _pulseProperties.MinBoxSize.z)
|
||||
cgf.BoxSize = new Vector3(cgf.BoxSize.x, cgf.BoxSize.y, cgf.BoxSize.z - (_pulseProperties.Speed * Time.deltaTime));
|
||||
else
|
||||
pulse_PositiveBoxZ = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
10
Assets/CircularGravityForce/Mods/CGF_Pulse.cs.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5ee348902befc68469fb62f0e43af39e
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: a93e150b85cf97c449c9f73f1eac1c50, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
187
Assets/CircularGravityForce/Mods/CGF_Pulse2D.cs
Normal file
|
@ -0,0 +1,187 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for cgf mod, creates a pulse effect using the cgf in 2D.
|
||||
*******************************************************************************************/
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
[RequireComponent(typeof(CGF2D))]
|
||||
public class CGF_Pulse2D : MonoBehaviour
|
||||
{
|
||||
#region Classis
|
||||
|
||||
//Pulse properties
|
||||
[System.Serializable]
|
||||
public class PulseProperties
|
||||
{
|
||||
[SerializeField, Tooltip("Enable/Disable's the pulse.")]
|
||||
private bool pulse = true;
|
||||
public bool Pulse
|
||||
{
|
||||
get { return pulse; }
|
||||
set { pulse = value; }
|
||||
}
|
||||
[SerializeField, Tooltip("Speed of the pulse.")]
|
||||
private float speed = 10f;
|
||||
public float Speed
|
||||
{
|
||||
get { return speed; }
|
||||
set { speed = value; }
|
||||
}
|
||||
[SerializeField, Tooltip("Min pulse size.")]
|
||||
private float minSize = 1f;
|
||||
public float MinSize
|
||||
{
|
||||
get { return minSize; }
|
||||
set { MinSize = value; }
|
||||
}
|
||||
[SerializeField, Tooltip("Max pulse size.")]
|
||||
private float maxSize = 5f;
|
||||
public float MaxSize
|
||||
{
|
||||
get { return maxSize; }
|
||||
set { maxSize = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Min pulse box size.")]
|
||||
private Vector2 minBoxSize = Vector2.one;
|
||||
public Vector2 MinBoxSize
|
||||
{
|
||||
get { return minBoxSize; }
|
||||
set { minBoxSize = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Max pulse box size.")]
|
||||
private Vector2 maxBoxSize = Vector2.one * 5f;
|
||||
public Vector2 MaxBoxSize
|
||||
{
|
||||
get { return maxBoxSize; }
|
||||
set { maxBoxSize = value; }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties/Constructor
|
||||
|
||||
[SerializeField, Tooltip("Pulse properties.")]
|
||||
private PulseProperties pulseProperties;
|
||||
public PulseProperties _pulseProperties
|
||||
{
|
||||
get { return pulseProperties; }
|
||||
set { pulseProperties = value; }
|
||||
}
|
||||
|
||||
private CGF2D cgf;
|
||||
|
||||
//Used to tell whether to add or subtract to pulse
|
||||
private bool pulse_Positive;
|
||||
private bool pulse_PositiveBoxX;
|
||||
private bool pulse_PositiveBoxY;
|
||||
|
||||
public CGF_Pulse2D()
|
||||
{
|
||||
_pulseProperties = new PulseProperties();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity Functions
|
||||
|
||||
void Start()
|
||||
{
|
||||
cgf = this.GetComponent<CGF2D>();
|
||||
|
||||
if (_pulseProperties.Pulse)
|
||||
{
|
||||
cgf.Size = _pulseProperties.MinSize;
|
||||
pulse_Positive = true;
|
||||
pulse_PositiveBoxX = true;
|
||||
pulse_PositiveBoxY = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (cgf.Enable)
|
||||
{
|
||||
if (_pulseProperties.Pulse)
|
||||
{
|
||||
CalculatePulse();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Functions
|
||||
|
||||
//Calculatie the given pulse
|
||||
void CalculatePulse()
|
||||
{
|
||||
if (_pulseProperties.Pulse)
|
||||
{
|
||||
if (cgf._shape2D != CGF2D.Shape2D.Box)
|
||||
CalculatePulseBySize();
|
||||
else
|
||||
CalculatePulseByBoxSize();
|
||||
}
|
||||
}
|
||||
|
||||
void CalculatePulseBySize()
|
||||
{
|
||||
if (pulse_Positive)
|
||||
{
|
||||
if (cgf.Size <= _pulseProperties.MaxSize)
|
||||
cgf.Size = cgf.Size + (_pulseProperties.Speed * Time.deltaTime);
|
||||
else
|
||||
pulse_Positive = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cgf.Size >= _pulseProperties.MinSize)
|
||||
cgf.Size = cgf.Size - (_pulseProperties.Speed * Time.deltaTime);
|
||||
else
|
||||
pulse_Positive = true;
|
||||
}
|
||||
}
|
||||
|
||||
void CalculatePulseByBoxSize()
|
||||
{
|
||||
if (pulse_PositiveBoxX)
|
||||
{
|
||||
if (cgf.BoxSize.x <= _pulseProperties.MaxBoxSize.x)
|
||||
cgf.BoxSize = new Vector2(cgf.BoxSize.x + (_pulseProperties.Speed * Time.deltaTime), cgf.BoxSize.y);
|
||||
else
|
||||
pulse_PositiveBoxX = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cgf.BoxSize.x >= _pulseProperties.MinBoxSize.x)
|
||||
cgf.BoxSize = new Vector2(cgf.BoxSize.x - (_pulseProperties.Speed * Time.deltaTime), cgf.BoxSize.y);
|
||||
else
|
||||
pulse_PositiveBoxX = true;
|
||||
}
|
||||
|
||||
if (pulse_PositiveBoxY)
|
||||
{
|
||||
if (cgf.BoxSize.y <= _pulseProperties.MaxBoxSize.y)
|
||||
cgf.BoxSize = new Vector2(cgf.BoxSize.x, cgf.BoxSize.y + (_pulseProperties.Speed * Time.deltaTime));
|
||||
else
|
||||
pulse_PositiveBoxY = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cgf.BoxSize.y >= _pulseProperties.MinBoxSize.y)
|
||||
cgf.BoxSize = new Vector2(cgf.BoxSize.x, cgf.BoxSize.y - (_pulseProperties.Speed * Time.deltaTime));
|
||||
else
|
||||
pulse_PositiveBoxY = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
10
Assets/CircularGravityForce/Mods/CGF_Pulse2D.cs.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 119293b2e68399a428b0e9b658187b31
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: a93e150b85cf97c449c9f73f1eac1c50, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
179
Assets/CircularGravityForce/Mods/CGF_SizeByRaycast.cs
Normal file
|
@ -0,0 +1,179 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for cgf mod, sizes the cgf object based of the raycast hit point.
|
||||
*******************************************************************************************/
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
[RequireComponent(typeof(CGF))]
|
||||
public class CGF_SizeByRaycast : MonoBehaviour
|
||||
{
|
||||
#region Properties
|
||||
|
||||
[SerializeField, Tooltip("Offset the raycast.")]
|
||||
private float offsetRaycast = 1f;
|
||||
public float OffsetRaycast
|
||||
{
|
||||
get { return offsetRaycast; }
|
||||
set { offsetRaycast = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Max size that the circular gravity force can get.")]
|
||||
private float maxCgfSize = 10f;
|
||||
public float MaxCgfSize
|
||||
{
|
||||
get { return maxCgfSize; }
|
||||
set { maxCgfSize = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Doesnt size box size x.")]
|
||||
private bool dontSizeBoxSizeX = false;
|
||||
public bool DontSizeBoxSizeX
|
||||
{
|
||||
get { return dontSizeBoxSizeX; }
|
||||
set { dontSizeBoxSizeX = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Doesnt size box size y.")]
|
||||
private bool dontSizeBoxSizeY = false;
|
||||
public bool DontSizeBoxSizeY
|
||||
{
|
||||
get { return dontSizeBoxSizeY; }
|
||||
set { dontSizeBoxSizeY = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Doesnt size box size z.")]
|
||||
private bool dontSizeBoxSizeZ = false;
|
||||
public bool DontSizeBoxSizeZ
|
||||
{
|
||||
get { return dontSizeBoxSizeZ; }
|
||||
set { dontSizeBoxSizeZ = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Raycast hit point."), HideInInspector()]
|
||||
private Vector3 hitPoint;
|
||||
public Vector3 HitPoint
|
||||
{
|
||||
get { return hitPoint; }
|
||||
set { hitPoint = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Layer mask used with the ray cast.")]
|
||||
private LayerMask layerMask = -1;
|
||||
public LayerMask _layerMask
|
||||
{
|
||||
get { return layerMask; }
|
||||
set { layerMask = value; }
|
||||
}
|
||||
|
||||
private CGF cgf;
|
||||
|
||||
private float gizmoSize = .25f;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Gizmos
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
Vector3 fwd = this.transform.TransformDirection(Vector3.forward);
|
||||
|
||||
RaycastHit hitInfo;
|
||||
|
||||
if(this.GetComponent<CGF>() != null)
|
||||
{
|
||||
gizmoSize = (this.GetComponent<CGF>().Size / 8f);
|
||||
if (gizmoSize > .25f)
|
||||
gizmoSize = .25f;
|
||||
else if (gizmoSize < -.25f)
|
||||
gizmoSize = -.25f;
|
||||
}
|
||||
|
||||
Color activeColor = Color.cyan;
|
||||
Color nonActiveColor = Color.white;
|
||||
|
||||
if (Physics.Raycast(this.transform.position, fwd, out hitInfo, MaxCgfSize, _layerMask))
|
||||
{
|
||||
if (hitInfo.distance > maxCgfSize)
|
||||
{
|
||||
Gizmos.color = nonActiveColor;
|
||||
Gizmos.DrawLine(this.transform.position, hitInfo.point);
|
||||
Gizmos.DrawSphere(hitInfo.point, gizmoSize);
|
||||
return;
|
||||
}
|
||||
|
||||
Gizmos.color = activeColor;
|
||||
Gizmos.DrawLine(this.transform.position, hitInfo.point);
|
||||
Gizmos.DrawSphere(hitInfo.point, gizmoSize);
|
||||
Gizmos.DrawSphere(hitInfo.point + (fwd * OffsetRaycast), gizmoSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
Gizmos.color = nonActiveColor;
|
||||
Gizmos.DrawLine(this.transform.position, this.transform.position + (fwd * MaxCgfSize));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity Functions
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
{
|
||||
cgf = this.GetComponent<CGF>();
|
||||
|
||||
cgf.Size = maxCgfSize;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
Vector3 fwd = this.transform.TransformDirection(Vector3.forward);
|
||||
|
||||
RaycastHit hitInfo;
|
||||
|
||||
float setSize = cgf.Size;
|
||||
|
||||
if (Physics.Raycast(this.transform.position, fwd, out hitInfo, MaxCgfSize, _layerMask))
|
||||
{
|
||||
if (hitInfo.distance > maxCgfSize)
|
||||
{
|
||||
setSize = maxCgfSize + OffsetRaycast;
|
||||
return;
|
||||
}
|
||||
|
||||
setSize = hitInfo.distance + OffsetRaycast;
|
||||
|
||||
hitPoint = hitInfo.point;
|
||||
}
|
||||
|
||||
if(hitInfo.distance == 0)
|
||||
{
|
||||
hitPoint = Vector3.zero;
|
||||
setSize = maxCgfSize + OffsetRaycast;
|
||||
}
|
||||
|
||||
if(cgf._shape != CGF.Shape.Box)
|
||||
cgf.Size = setSize;
|
||||
else
|
||||
{
|
||||
Vector3 setBoxSize = new Vector3(cgf.BoxSize.x, cgf.BoxSize.y, cgf.BoxSize.z);
|
||||
if (!DontSizeBoxSizeX)
|
||||
setBoxSize = new Vector3(setSize, setBoxSize.y, setBoxSize.z);
|
||||
if (!DontSizeBoxSizeY)
|
||||
setBoxSize = new Vector3(setBoxSize.x, setSize, setBoxSize.z);
|
||||
if (!DontSizeBoxSizeZ)
|
||||
setBoxSize = new Vector3(setBoxSize.x, setBoxSize.y, setSize);
|
||||
|
||||
cgf.BoxSize = setBoxSize;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
10
Assets/CircularGravityForce/Mods/CGF_SizeByRaycast.cs.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b6b9e89e01af01040a1b0c2237670ad8
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: dea38dc476f629e4a8e621ac392c18c4, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
168
Assets/CircularGravityForce/Mods/CGF_SizeByRaycast2D.cs
Normal file
|
@ -0,0 +1,168 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for cgf mod, sizes the cgf object based of the raycast hit point in 2D.
|
||||
*******************************************************************************************/
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
[RequireComponent(typeof(CGF2D))]
|
||||
public class CGF_SizeByRaycast2D : MonoBehaviour
|
||||
{
|
||||
#region Properties
|
||||
|
||||
[SerializeField, Tooltip("Offset the raycast.")]
|
||||
private float offsetRaycast = 1f;
|
||||
public float OffsetRaycast
|
||||
{
|
||||
get { return offsetRaycast; }
|
||||
set { offsetRaycast = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Max size that the circular gravity force can get.")]
|
||||
private float maxCgfSize = 10f;
|
||||
public float MaxCgfSize
|
||||
{
|
||||
get { return maxCgfSize; }
|
||||
set { maxCgfSize = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Doesnt size box size x.")]
|
||||
private bool dontSizeBoxSizeX = false;
|
||||
public bool DontSizeBoxSizeX
|
||||
{
|
||||
get { return dontSizeBoxSizeX; }
|
||||
set { dontSizeBoxSizeX = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Doesnt size box size y.")]
|
||||
private bool dontSizeBoxSizeY = false;
|
||||
public bool DontSizeBoxSizeY
|
||||
{
|
||||
get { return dontSizeBoxSizeY; }
|
||||
set { dontSizeBoxSizeY = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Raycast hit point.")]
|
||||
private Vector2 hitPoint;
|
||||
public Vector2 HitPoint
|
||||
{
|
||||
get { return hitPoint; }
|
||||
set { hitPoint = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Layer mask used with the ray cast.")]
|
||||
private LayerMask layerMask = -1;
|
||||
public LayerMask _layerMask
|
||||
{
|
||||
get { return layerMask; }
|
||||
set { layerMask = value; }
|
||||
}
|
||||
|
||||
private CGF2D cgf;
|
||||
|
||||
private float gizmoSize = .25f;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Gizmos
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
Vector3 fwd = this.transform.TransformDirection(Vector3.right);
|
||||
|
||||
RaycastHit2D hitInfo = Physics2D.Raycast(this.transform.position, fwd, MaxCgfSize, _layerMask);
|
||||
|
||||
if (this.GetComponent<CGF>() != null)
|
||||
{
|
||||
gizmoSize = (this.GetComponent<CGF>().Size / 8f);
|
||||
if (gizmoSize > .25f)
|
||||
gizmoSize = .25f;
|
||||
else if (gizmoSize < -.25f)
|
||||
gizmoSize = -.25f;
|
||||
}
|
||||
|
||||
Color activeColor = Color.cyan;
|
||||
Color nonActiveColor = Color.white;
|
||||
|
||||
if (hitInfo.transform == null)
|
||||
{
|
||||
Gizmos.color = nonActiveColor;
|
||||
Gizmos.DrawLine(new Vector3(this.transform.position.x, this.transform.position.y, 0f), new Vector3(this.transform.position.x, this.transform.position.y, 0f) + (fwd * MaxCgfSize));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Vector2.Distance(this.transform.position, hitInfo.point) > maxCgfSize)
|
||||
{
|
||||
Gizmos.color = nonActiveColor;
|
||||
Gizmos.DrawLine(new Vector3(this.transform.position.x, this.transform.position.y, 0f), hitInfo.point);
|
||||
Gizmos.DrawSphere(hitInfo.point, gizmoSize);
|
||||
return;
|
||||
}
|
||||
else if(hitInfo.transform != null)
|
||||
{
|
||||
Gizmos.color = activeColor;
|
||||
Gizmos.DrawLine(new Vector3(this.transform.position.x, this.transform.position.y, 0f), hitInfo.point);
|
||||
Gizmos.DrawSphere(hitInfo.point, gizmoSize);
|
||||
Gizmos.DrawSphere((Vector3)hitInfo.point + (fwd * OffsetRaycast), gizmoSize);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity Functions
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
{
|
||||
cgf = this.GetComponent<CGF2D>();
|
||||
|
||||
cgf.Size = maxCgfSize;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
Vector3 fwd = this.transform.TransformDirection(Vector3.right);
|
||||
|
||||
RaycastHit2D hitInfo = Physics2D.Raycast(this.transform.position, fwd, MaxCgfSize, _layerMask);
|
||||
|
||||
float setSize = cgf.Size;
|
||||
|
||||
if (Vector2.Distance(this.transform.position, hitInfo.point) > maxCgfSize)
|
||||
{
|
||||
setSize = maxCgfSize + OffsetRaycast;
|
||||
hitPoint = hitInfo.point;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Vector2.Distance(this.transform.position, hitInfo.point) == 0)
|
||||
{
|
||||
setSize = maxCgfSize + OffsetRaycast;
|
||||
hitPoint = Vector2.zero;
|
||||
}
|
||||
else
|
||||
{
|
||||
setSize = Vector2.Distance(this.transform.position, hitInfo.point) + OffsetRaycast;
|
||||
hitPoint = hitInfo.point;
|
||||
}
|
||||
|
||||
if (cgf._shape2D != CGF2D.Shape2D.Box)
|
||||
cgf.Size = setSize;
|
||||
else
|
||||
{
|
||||
Vector2 setBoxSize = new Vector3(cgf.BoxSize.x, cgf.BoxSize.y);
|
||||
if (!DontSizeBoxSizeX)
|
||||
setBoxSize = new Vector3(setSize, setBoxSize.y);
|
||||
if (!DontSizeBoxSizeY)
|
||||
setBoxSize = new Vector3(setBoxSize.x, setSize);
|
||||
|
||||
cgf.BoxSize = setBoxSize;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
10
Assets/CircularGravityForce/Mods/CGF_SizeByRaycast2D.cs.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0e62eb3613f3fad428e3536b7c331fab
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: dea38dc476f629e4a8e621ac392c18c4, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
9
Assets/CircularGravityForce/Triggers.meta
Normal file
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 657d2602955c21b4d905fef2dbcd2cfb
|
||||
folderAsset: yes
|
||||
timeCreated: 1455067499
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
130
Assets/CircularGravityForce/Triggers/CGF_EnableTrigger.cs
Normal file
|
@ -0,0 +1,130 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for cgf trigger, used for enabling or disabling based of if the raycast
|
||||
* is tripped.
|
||||
*******************************************************************************************/
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
public class CGF_EnableTrigger : MonoBehaviour
|
||||
{
|
||||
#region Properties
|
||||
|
||||
[SerializeField, Tooltip("Circular gravity force object used for the enable trigger.")]
|
||||
private CGF cgf;
|
||||
public CGF Cgf
|
||||
{
|
||||
get { return cgf; }
|
||||
set { cgf = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Value when tripped.")]
|
||||
private bool tripValue = true;
|
||||
public bool TripValue
|
||||
{
|
||||
get { return tripValue; }
|
||||
set { tripValue = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Max trip wire distance.")]
|
||||
private float maxTripDistance = 10f;
|
||||
public float MaxTripDistance
|
||||
{
|
||||
get { return maxTripDistance; }
|
||||
set { maxTripDistance = value; }
|
||||
}
|
||||
|
||||
//Used for if you want to ignore a layer
|
||||
[SerializeField, Tooltip("Layer mask used for the ray cast.")]
|
||||
private LayerMask layerMask = -1;
|
||||
public LayerMask _layerMask
|
||||
{
|
||||
get { return layerMask; }
|
||||
set { layerMask = value; }
|
||||
}
|
||||
|
||||
private float gizmoSize = .25f;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Gizmos
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
Vector3 fwd = this.transform.TransformDirection(Vector3.forward);
|
||||
|
||||
RaycastHit hitInfo;
|
||||
|
||||
if (cgf != null)
|
||||
{
|
||||
gizmoSize = (cgf.Size / 8f);
|
||||
if (gizmoSize > .25f)
|
||||
gizmoSize = .25f;
|
||||
else if (gizmoSize < -.25f)
|
||||
gizmoSize = -.25f;
|
||||
}
|
||||
|
||||
Color activeColor = Color.cyan;
|
||||
Color nonActiveColor = Color.white;
|
||||
|
||||
if (Physics.Raycast(this.transform.position, fwd, out hitInfo, maxTripDistance, _layerMask))
|
||||
{
|
||||
if (hitInfo.distance > maxTripDistance)
|
||||
{
|
||||
Gizmos.color = nonActiveColor;
|
||||
Gizmos.DrawLine(this.transform.position, hitInfo.point);
|
||||
Gizmos.DrawSphere(this.transform.position, gizmoSize);
|
||||
Gizmos.DrawSphere(hitInfo.point, gizmoSize);
|
||||
return;
|
||||
}
|
||||
|
||||
Gizmos.color = activeColor;
|
||||
Gizmos.DrawLine(this.transform.position, hitInfo.point);
|
||||
Gizmos.DrawSphere(hitInfo.point, gizmoSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
Gizmos.color = nonActiveColor;
|
||||
Gizmos.DrawLine(this.transform.position, this.transform.position + (fwd * MaxTripDistance));
|
||||
}
|
||||
|
||||
Gizmos.DrawSphere(this.transform.position, gizmoSize);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity Functions
|
||||
|
||||
void Start()
|
||||
{
|
||||
cgf.Enable = !TripValue;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
Vector3 fwd = this.transform.TransformDirection(Vector3.forward);
|
||||
|
||||
RaycastHit hitInfo;
|
||||
|
||||
if (Physics.Raycast(this.transform.position, fwd, out hitInfo, maxTripDistance, _layerMask))
|
||||
{
|
||||
if (hitInfo.distance > maxTripDistance)
|
||||
{
|
||||
cgf.Enable = !TripValue;
|
||||
return;
|
||||
}
|
||||
|
||||
cgf.Enable = TripValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
cgf.Enable = !TripValue;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2aa51042984638f49b17f6d428c08f0c
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: c76c8054dda1d5b419f45f0fe57f07d3, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
131
Assets/CircularGravityForce/Triggers/CGF_EnableTrigger2D.cs
Normal file
|
@ -0,0 +1,131 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for cgf trigger, used for enabling or disabling based of if the raycast
|
||||
* is tripped in 2D.
|
||||
*******************************************************************************************/
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
public class CGF_EnableTrigger2D : MonoBehaviour
|
||||
{
|
||||
#region Properties
|
||||
|
||||
[SerializeField, Tooltip("Circular gravity force object used for the enable trigger.")]
|
||||
private CGF2D cgf;
|
||||
public CGF2D Cgf
|
||||
{
|
||||
get { return cgf; }
|
||||
set { cgf = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Value when tripped.")]
|
||||
private bool tripValue = true;
|
||||
public bool TripValue
|
||||
{
|
||||
get { return tripValue; }
|
||||
set { tripValue = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Max trip wire distance.")]
|
||||
private float maxTripDistance = 10f;
|
||||
public float MaxTripDistance
|
||||
{
|
||||
get { return maxTripDistance; }
|
||||
set { maxTripDistance = value; }
|
||||
}
|
||||
|
||||
//Used for if you want to ignore a layer
|
||||
[SerializeField, Tooltip("Layer mask used for the ray cast.")]
|
||||
private LayerMask layerMask = -1;
|
||||
public LayerMask _layerMask
|
||||
{
|
||||
get { return layerMask; }
|
||||
set { layerMask = value; }
|
||||
}
|
||||
|
||||
private float gizmoSize = .25f;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Gizmos
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
Vector3 fwd = this.transform.TransformDirection(Vector3.right);
|
||||
|
||||
RaycastHit2D hitInfo = Physics2D.Raycast(this.transform.position, fwd, maxTripDistance, _layerMask);
|
||||
|
||||
if (cgf != null)
|
||||
{
|
||||
gizmoSize = (cgf.Size / 8f);
|
||||
if (gizmoSize > .25f)
|
||||
gizmoSize = .25f;
|
||||
else if (gizmoSize < -.25f)
|
||||
gizmoSize = -.25f;
|
||||
}
|
||||
|
||||
Color activeColor = Color.cyan;
|
||||
Color nonActiveColor = Color.white;
|
||||
|
||||
Gizmos.DrawSphere(this.transform.position, gizmoSize);
|
||||
|
||||
if (hitInfo.transform == null)
|
||||
{
|
||||
Gizmos.color = nonActiveColor;
|
||||
Gizmos.DrawLine(this.transform.position, this.transform.position + (fwd * maxTripDistance));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Vector2.Distance(this.transform.position, hitInfo.point) > maxTripDistance)
|
||||
{
|
||||
Gizmos.color = nonActiveColor;
|
||||
Gizmos.DrawLine (this.transform.position, hitInfo.point);
|
||||
Gizmos.DrawSphere(hitInfo.point, gizmoSize);
|
||||
return;
|
||||
}
|
||||
else if (hitInfo.transform != null)
|
||||
{
|
||||
Gizmos.color = activeColor;
|
||||
Gizmos.DrawLine (this.transform.position, hitInfo.point);
|
||||
Gizmos.DrawSphere(this.transform.position, gizmoSize);
|
||||
Gizmos.DrawSphere(hitInfo.point, gizmoSize);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity Functions
|
||||
|
||||
void Start()
|
||||
{
|
||||
cgf.Enable = !TripValue;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
Vector3 fwd = this.transform.TransformDirection(Vector3.right);
|
||||
|
||||
RaycastHit2D hitInfo = Physics2D.Raycast(this.transform.position, fwd, maxTripDistance, _layerMask);
|
||||
|
||||
if (Vector2.Distance(this.transform.position, hitInfo.point) > maxTripDistance)
|
||||
{
|
||||
cgf.Enable = !TripValue;
|
||||
return;
|
||||
}
|
||||
|
||||
if (hitInfo.transform != null)
|
||||
{
|
||||
cgf.Enable = TripValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
cgf.Enable = !TripValue;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: be77292b8f0ebb946b66dc461e4bb3d1
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: c76c8054dda1d5b419f45f0fe57f07d3, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
133
Assets/CircularGravityForce/Triggers/CGF_HoverTrigger.cs
Normal file
|
@ -0,0 +1,133 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for cgf trigger, used creating a hover effect using the cgf object.
|
||||
*******************************************************************************************/
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
public class CGF_HoverTrigger : MonoBehaviour
|
||||
{
|
||||
#region Properties
|
||||
|
||||
[SerializeField, Tooltip("Circular gravity force object used for the hover trigger.")]
|
||||
private CGF cgf;
|
||||
public CGF Cgf
|
||||
{
|
||||
get { return cgf; }
|
||||
set { cgf = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Hover force power.")]
|
||||
private float forcePower = 30f;
|
||||
public float ForcePower
|
||||
{
|
||||
get { return forcePower; }
|
||||
set { forcePower = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Hover distance.")]
|
||||
private float hoverDistance = 3f;
|
||||
public float HoverDistance
|
||||
{
|
||||
get { return hoverDistance; }
|
||||
set { hoverDistance = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Max distace it can hover.")]
|
||||
private float maxDistance = 10f;
|
||||
public float MaxDistance
|
||||
{
|
||||
get { return maxDistance; }
|
||||
set { maxDistance = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Layer mask used from the ray cast.")]
|
||||
private LayerMask layerMask = -1;
|
||||
public LayerMask _layerMask
|
||||
{
|
||||
get { return layerMask; }
|
||||
set { layerMask = value; }
|
||||
}
|
||||
|
||||
private float gizmoSize = .25f;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Gizmos
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
Vector3 fwd = this.transform.TransformDirection(Vector3.forward);
|
||||
|
||||
RaycastHit hitInfo;
|
||||
|
||||
if (cgf != null)
|
||||
{
|
||||
gizmoSize = (cgf.Size / 8f);
|
||||
if (gizmoSize > .25f)
|
||||
gizmoSize = .25f;
|
||||
else if (gizmoSize < -.25f)
|
||||
gizmoSize = -.25f;
|
||||
}
|
||||
|
||||
Color activeColor = Color.cyan;
|
||||
Color nonActiveColor = Color.white;
|
||||
|
||||
if (Physics.Raycast(this.transform.position, fwd, out hitInfo, maxDistance, _layerMask))
|
||||
{
|
||||
if (hitInfo.distance < maxDistance)
|
||||
{
|
||||
Gizmos.color = activeColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
Gizmos.color = nonActiveColor;
|
||||
}
|
||||
|
||||
Gizmos.DrawLine(this.transform.position, hitInfo.point);
|
||||
Gizmos.DrawSphere(hitInfo.point, gizmoSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
Gizmos.color = Color.white;
|
||||
Gizmos.DrawLine(this.transform.position, this.transform.position + (fwd * MaxDistance));
|
||||
}
|
||||
|
||||
Gizmos.DrawSphere(this.transform.position, gizmoSize);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity Functions
|
||||
|
||||
void Update()
|
||||
{
|
||||
Vector3 fwd = this.transform.TransformDirection(Vector3.forward);
|
||||
|
||||
RaycastHit hitInfo;
|
||||
|
||||
if (Physics.Raycast(this.transform.position, fwd, out hitInfo, maxDistance, _layerMask))
|
||||
{
|
||||
if (hitInfo.distance < maxDistance)
|
||||
{
|
||||
float proportionalHeight = (HoverDistance - hitInfo.distance) / HoverDistance;
|
||||
cgf.ForcePower = proportionalHeight * ForcePower;
|
||||
}
|
||||
else
|
||||
{
|
||||
cgf.ForcePower = 0f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cgf.ForcePower = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d085fa86d99f0de4c830db21db27619a
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: ebbfe06719ef10141a69ac0f48c3dc63, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
133
Assets/CircularGravityForce/Triggers/CGF_HoverTrigger2D.cs
Normal file
|
@ -0,0 +1,133 @@
|
|||
/*******************************************************************************************
|
||||
* Author: Lane Gresham, AKA LaneMax
|
||||
* Websites: http://resurgamstudios.com
|
||||
* Description: Used for cgf trigger, used creating a hover effect using the cgf object in 2D.
|
||||
*******************************************************************************************/
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
namespace CircularGravityForce
|
||||
{
|
||||
public class CGF_HoverTrigger2D : MonoBehaviour
|
||||
{
|
||||
#region Properties
|
||||
|
||||
[SerializeField, Tooltip("Circular gravity force object used for the hover trigger.")]
|
||||
private CGF2D cgf;
|
||||
public CGF2D Cgf
|
||||
{
|
||||
get { return cgf; }
|
||||
set { cgf = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Hover force power.")]
|
||||
private float forcePower = 30f;
|
||||
public float ForcePower
|
||||
{
|
||||
get { return forcePower; }
|
||||
set { forcePower = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Max distace it can hover.")]
|
||||
private float hoverDistance = 3f;
|
||||
public float HoverDistance
|
||||
{
|
||||
get { return hoverDistance; }
|
||||
set { hoverDistance = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Max distace it can hover.")]
|
||||
private float maxDistance = 10f;
|
||||
public float MaxDistance
|
||||
{
|
||||
get { return maxDistance; }
|
||||
set { maxDistance = value; }
|
||||
}
|
||||
|
||||
[SerializeField, Tooltip("Layer mask used from the ray cast.")]
|
||||
private LayerMask layerMask = -1;
|
||||
public LayerMask _layerMask
|
||||
{
|
||||
get { return layerMask; }
|
||||
set { layerMask = value; }
|
||||
}
|
||||
|
||||
private float gizmoSize = .25f;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Gizmos
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
Vector3 fwd = this.transform.TransformDirection(Vector3.right);
|
||||
|
||||
RaycastHit2D hitInfo = Physics2D.Raycast(this.transform.position, fwd, MaxDistance, _layerMask);
|
||||
|
||||
if (cgf != null)
|
||||
{
|
||||
gizmoSize = (cgf.Size / 8f);
|
||||
if (gizmoSize > .25f)
|
||||
gizmoSize = .25f;
|
||||
else if (gizmoSize < -.25f)
|
||||
gizmoSize = -.25f;
|
||||
}
|
||||
|
||||
Color activeColor = Color.cyan;
|
||||
Color nonActiveColor = Color.white;
|
||||
|
||||
Gizmos.DrawSphere(this.transform.position, gizmoSize);
|
||||
|
||||
if (hitInfo.transform == null)
|
||||
{
|
||||
Gizmos.color = nonActiveColor;
|
||||
Gizmos.DrawLine(this.transform.position, this.transform.position + (fwd * MaxDistance));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Vector2.Distance(this.transform.position, hitInfo.point) > maxDistance)
|
||||
{
|
||||
Gizmos.color = nonActiveColor;
|
||||
Gizmos.DrawLine(this.transform.position, hitInfo.point);
|
||||
|
||||
Gizmos.DrawSphere(hitInfo.point, gizmoSize);
|
||||
return;
|
||||
}
|
||||
else if (hitInfo.transform != null)
|
||||
{
|
||||
Gizmos.color = activeColor;
|
||||
Gizmos.DrawLine(this.transform.position, hitInfo.point);
|
||||
Gizmos.DrawSphere(this.transform.position, gizmoSize);
|
||||
Gizmos.DrawSphere(hitInfo.point, gizmoSize);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity Functions
|
||||
|
||||
void Update()
|
||||
{
|
||||
Vector3 fwd = this.transform.TransformDirection(Vector3.right);
|
||||
|
||||
RaycastHit2D hitInfo = Physics2D.Raycast(this.transform.position, fwd, MaxDistance, _layerMask);
|
||||
|
||||
if (Vector2.Distance(this.transform.position, hitInfo.point) > maxDistance)
|
||||
{
|
||||
cgf.ForcePower = 0f;
|
||||
}
|
||||
|
||||
if (hitInfo.transform != null)
|
||||
{
|
||||
float proportionalHeight = (HoverDistance - Vector2.Distance(this.transform.position, hitInfo.point)) / HoverDistance;
|
||||
cgf.ForcePower = proportionalHeight * ForcePower;
|
||||
}
|
||||
else
|
||||
{
|
||||
cgf.ForcePower = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a037ad42fe338704ca48e18a9573104d
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 2800000, guid: ebbfe06719ef10141a69ac0f48c3dc63, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
2
Assets/LipSync-Pro-main/.gitattributes
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
36
Assets/LipSync-Pro-main/.gitignore
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
[Ll]ibrary/
|
||||
[Tt]emp/
|
||||
[Oo]bj/
|
||||
[Bb]uild/
|
||||
[Bb]uilds/
|
||||
Assets/AssetStoreTools*
|
||||
|
||||
# Visual Studio cache directory
|
||||
.vs/
|
||||
|
||||
# Autogenerated VS/MD/Consulo solution and project files
|
||||
ExportedObj/
|
||||
.consulo/
|
||||
*.csproj
|
||||
*.unityproj
|
||||
*.sln
|
||||
*.suo
|
||||
*.tmp
|
||||
*.user
|
||||
*.userprefs
|
||||
*.pidb
|
||||
*.booproj
|
||||
*.svd
|
||||
*.pdb
|
||||
*.opendb
|
||||
*.VC.db
|
||||
|
||||
# Unity3D generated meta files
|
||||
*.pidb.meta
|
||||
*.pdb.meta
|
||||
|
||||
# Unity3D Generated File On Crash Reports
|
||||
sysinfo.txt
|
||||
|
||||
# Builds
|
||||
*.apk
|
373
Assets/LipSync-Pro-main/LICENSE
Normal file
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7e1a699a1b75abb4dac134babfa44ec3
|
||||
folderAsset: yes
|
||||
timeCreated: 1460064333
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 03c69fbb18292aa46b90a5c808f0d2ba
|
||||
folderAsset: yes
|
||||
timeCreated: 1460048946
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d8d15755430de914492a3a8db939c95b
|
||||
folderAsset: yes
|
||||
timeCreated: 1460048965
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3a35b6bd7fd62fa4799895aea5daba76
|
||||
folderAsset: yes
|
||||
timeCreated: 1453865904
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 70 KiB |
|
@ -0,0 +1,55 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2525d7dd0b483f04cb6041834e9e9258
|
||||
timeCreated: 1437475031
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e2f4ecf58f896e04794bd70f47bbe5cb
|
||||
folderAsset: yes
|
||||
timeCreated: 1453865900
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 72 KiB |
|
@ -0,0 +1,55 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 89e45c2302a94e6448de70e990db1a9c
|
||||
timeCreated: 1437475031
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bc25f7a6a8777034cb0623e966ffe219
|
||||
folderAsset: yes
|
||||
timeCreated: 1460048952
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 476c7b8a00c55fb458e56d9c64e3f564
|
||||
folderAsset: yes
|
||||
timeCreated: 1428778472
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 62 KiB |
|
@ -0,0 +1,108 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 97e233bb76603fc458cf36e8b8b516c8
|
||||
timeCreated: 1548722281
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: tvOS
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 54 KiB |
|
@ -0,0 +1,55 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9d6b0fcdbd4d0944789be04b43aa2de6
|
||||
timeCreated: 1453683423
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 54 KiB |
|
@ -0,0 +1,55 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 178b5e2d56e9d7647b798d7c2ff2506e
|
||||
timeCreated: 1437065427
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 39 KiB |
|
@ -0,0 +1,114 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a79853d7db6427b47b2d60eb59f33336
|
||||
timeCreated: 1513773938
|
||||
licenseType: Pro
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapU: 1
|
||||
wrapV: -1
|
||||
wrapW: -1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Windows Store Apps
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 48 KiB |
|
@ -0,0 +1,56 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5c8b65da1aa2ce94880df4af0ec77a3b
|
||||
timeCreated: 1442429884
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 74 KiB |
|
@ -0,0 +1,53 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 66f6896bb34e6d24da76779123904301
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 79 KiB |
|
@ -0,0 +1,55 @@
|
|||
fileFormatVersion: 2
|
||||
guid: be5e652005382264ca6aa3001280114e
|
||||
timeCreated: 1455410616
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 51 KiB |
|
@ -0,0 +1,108 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c58a7e0be8bb50040a4a9f653a66b485
|
||||
timeCreated: 1548722361
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: tvOS
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 48 KiB |
|
@ -0,0 +1,53 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 123000b7ed0e6e64a84605e7e78b7967
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 62 KiB |
|
@ -0,0 +1,53 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 17d43a8e0f71ad0419776853367a7ca3
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 48 KiB |
|
@ -0,0 +1,108 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 72e32e0135a07f348ad056dda99ad598
|
||||
timeCreated: 1548722361
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: tvOS
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 54 KiB |
|
@ -0,0 +1,55 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4d1bcd7209c7c584797e61f70611027c
|
||||
timeCreated: 1449850423
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 49 KiB |
|
@ -0,0 +1,108 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 17766184ea1f69544ac8a41d6eddfbe1
|
||||
timeCreated: 1559142085
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: tvOS
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 50 KiB |
|
@ -0,0 +1,108 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c043b6f0681bea245b14a271b2104391
|
||||
timeCreated: 1548723327
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: tvOS
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 43 KiB |
|
@ -0,0 +1,55 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b611fee8b6009a54c925470a487e2555
|
||||
timeCreated: 1476407810
|
||||
licenseType: Pro
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 63 KiB |
|
@ -0,0 +1,53 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 19c8fd5cda9cb4e40bb7cf2b883e2494
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 48 KiB |
|
@ -0,0 +1,53 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4aa63cf7169dafe469978d48daa1bc31
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 49 KiB |
|
@ -0,0 +1,57 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 498eeaec2d4403a4d867e88ee0f24c3e
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 51 KiB |
|
@ -0,0 +1,56 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1bab052f4195c314183c84e6ef90433f
|
||||
timeCreated: 1442429884
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 62 KiB |
|
@ -0,0 +1,108 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 881e795ab77ded143aa169bb9502533c
|
||||
timeCreated: 1548722281
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: tvOS
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9d04e1ed6339bdf43b32ca82172e299c
|
||||
folderAsset: yes
|
||||
timeCreated: 1435339608
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 93 KiB |
|
@ -0,0 +1,55 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3161e702c666a1f4d8cedfae9e7b1a5e
|
||||
timeCreated: 1435339608
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|