init 1.1.2
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace EmeraldAI
|
||||
{
|
||||
[System.Serializable]
|
||||
public class AnimationClass
|
||||
{
|
||||
public AnimationClass(float NewAnimationSpeed, AnimationClip NewAnimationClip, bool NewMirror)
|
||||
{
|
||||
AnimationSpeed = NewAnimationSpeed;
|
||||
AnimationClip = NewAnimationClip;
|
||||
Mirror = NewMirror;
|
||||
}
|
||||
|
||||
public float AnimationSpeed = 1;
|
||||
public AnimationClip AnimationClip;
|
||||
public bool Mirror = false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 63a47e5720f75cf4a9d3a28c0d699b90
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,121 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EmeraldAI.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// Populates the Animation Preview Editor with the preset Animation Event data.
|
||||
/// </summary>
|
||||
public static class AnimationEventInitializer
|
||||
{
|
||||
public static List<EmeraldAnimationEventsClass> GetEmeraldAnimationEvents ()
|
||||
{
|
||||
List<EmeraldAnimationEventsClass> EmeraldAnimationEvents = new List<EmeraldAnimationEventsClass>();
|
||||
|
||||
//Custom
|
||||
AnimationEvent Custom = new AnimationEvent();
|
||||
Custom.functionName = "---YOUR FUNCTION NAME HERE---";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Custom", Custom, "A custom/default event with no added parameters"));
|
||||
|
||||
//Emerald Attack Event
|
||||
AnimationEvent EmeraldAttack = new AnimationEvent();
|
||||
EmeraldAttack.functionName = "CreateAbility";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Create Ability", EmeraldAttack, "An event used for creating an AI's current ability (previously called EmeraldAttackEvent). This is required for Ability Objects to be triggered and should be done for all attack animations.\n\nNote: If your AI uses Attack Transform, " +
|
||||
"you should include the name of the Attack Transform in the String Paramter of this event. This will allow an ability to spawn from the Attack Transform location."));
|
||||
|
||||
//Charge Ability
|
||||
AnimationEvent ChargeEffect = new AnimationEvent();
|
||||
ChargeEffect.functionName = "ChargeEffect";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Charge Effect", ChargeEffect, "An event used for triggering an AI's current abilty's Charge Effect. You will need to add the Attack Transform you would like the charge effect to spawn at. " +
|
||||
"This is done through the String Parameter and is based off of the AI's Attack Transform list within its Combat Component. An Ability Object must have a Charge Module and have it enabled or this event will be skipped." +
|
||||
"\n\nNote: This will not create an ability. The CreateAbility event still needs to be assigned, which should be after a Charge Effect event. This Animation Event is completely optional."));
|
||||
|
||||
//Fade Out IK
|
||||
AnimationEvent FadeOutIK = new AnimationEvent();
|
||||
FadeOutIK.functionName = "FadeOutIK";
|
||||
FadeOutIK.floatParameter = 5f;
|
||||
FadeOutIK.stringParameter = "---YOUR RIG NAME TO FADE HERE---";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Fade Out IK", FadeOutIK, "Fade out an AI's IK overtime. This is helpful if an AI's IK is interfering with certain animations " +
|
||||
"(such as hit, equipping, certain attacks, and death animations).\n\nFloatParamer = Fade Out Time (In Seconds)\n\nStringParameter = The name of your rig you'd like to fade out"));
|
||||
|
||||
//Fade In IK
|
||||
AnimationEvent FadeInIK = new AnimationEvent();
|
||||
FadeInIK.functionName = "FadeInIK";
|
||||
FadeInIK.floatParameter = 5f;
|
||||
FadeInIK.stringParameter = "---YOUR RIG NAME TO FADE HERE---";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Fade In IK", FadeInIK, "Fade in an AI's IK overtime. This should be used after Fade Out IK has been used.\n\nFloatParamer = Fade In Time (In Seconds)\n\nStringParameter = The name of your rig you'd like to fade in"));
|
||||
|
||||
//Enable Weapon Collider
|
||||
AnimationEvent EnableWeaponCollider = new AnimationEvent();
|
||||
EnableWeaponCollider.functionName = "EnableWeaponCollider";
|
||||
EnableWeaponCollider.stringParameter = "---THE NAME OF YOUR AI'S WEAPON HERE---";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Enable Weapon Collider", EnableWeaponCollider, "Enables an AI's weapon's collider (The weapon object must also have a WeaponCollider component and be set up through an AI's EmeraldItems component)." +
|
||||
"\n\nNote: You must also assign the gameobject name of your AI's weapon to the String parameter of this Animation Event. This is used to search through an AI's Items Component to find which weapon to enable. For a detailed tutorial on this, see the Emerald AI Wiki."));
|
||||
|
||||
//Disable Weapon Collider
|
||||
AnimationEvent DisableWeaponCollider = new AnimationEvent();
|
||||
DisableWeaponCollider.functionName = "DisableWeaponCollider";
|
||||
DisableWeaponCollider.stringParameter = "---THE NAME OF YOUR AI'S WEAPON HERE---";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Disable Weapon Collider", DisableWeaponCollider, "Disables an AI's weapon's collider (The weapon object must also have a WeaponCollider component and be set up through an AI's EmeraldItems component)." +
|
||||
"\n\nNote: You must also assign the gameobject name of your AI's weapon to the String parameter of this Animation Event. This is used to search through an AI's Items Component to find which weapon to disable. For a detailed tutorial on this, see the Emerald AI Wiki."));
|
||||
|
||||
//Equip Weapon 1
|
||||
AnimationEvent EquipWeapon1 = new AnimationEvent();
|
||||
EquipWeapon1.functionName = "EquipWeapon";
|
||||
EquipWeapon1.stringParameter = "Weapon Type 1";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Equip Weapon Type 1", EquipWeapon1, "Equip an AI's Type 1 Weapon (The weapon object must be setup through Emerald AI)"));
|
||||
|
||||
//Equip Weapon 2
|
||||
AnimationEvent EquipWeapon2 = new AnimationEvent();
|
||||
EquipWeapon2.functionName = "EquipWeapon";
|
||||
EquipWeapon2.stringParameter = "Weapon Type 2";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Equip Weapon Type 2", EquipWeapon2, "Equip an AI's Type 2 Weapon (The weapon object must be setup through Emerald AI)"));
|
||||
|
||||
//Unequip Weapon 1
|
||||
AnimationEvent UnequipWeapon1 = new AnimationEvent();
|
||||
UnequipWeapon1.functionName = "UnequipWeapon";
|
||||
UnequipWeapon1.stringParameter = "Weapon Type 1";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Unequip Weapon Type 1", UnequipWeapon1, "Unquip an AI's Type 1 Weapon (The weapon object must be setup through Emerald AI)"));
|
||||
|
||||
//Unequip Weapon 2
|
||||
AnimationEvent UnequipWeapon2 = new AnimationEvent();
|
||||
UnequipWeapon2.functionName = "UnequipWeapon";
|
||||
UnequipWeapon2.stringParameter = "Weapon Type 2";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Unequip Weapon Type 2", UnequipWeapon2, "Unequip an AI's Type 2 Weapon (The weapon object must be setup through Emerald AI)"));
|
||||
|
||||
//Enable Item
|
||||
AnimationEvent EnableItem = new AnimationEvent();
|
||||
EnableItem.functionName = "EnableItem";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Enable Item", EnableItem, "Enable an Item by passing the ItemID. This is based off of an AI's Item List and an AI must have an EmeraldAIItem component.\n\nIntParameter = ItemID"));
|
||||
|
||||
//Disable Item
|
||||
AnimationEvent DisableItem = new AnimationEvent();
|
||||
DisableItem.functionName = "DisableItem";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Disable Item", DisableItem, "Disable an Item by passing the ItemID. This is based off of an AI's Item List and an AI must have an EmeraldAIItem component.\n\nIntParameter = ItemID"));
|
||||
|
||||
//Footstep Sound
|
||||
AnimationEvent Footstep = new AnimationEvent();
|
||||
Footstep.functionName = "Footstep";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Footstep", Footstep, "If using a Footstep Component:\nCreates a footstep effect and sound based on the detected surface of the footstep (requires a Footstep Component that has been set up).\n\n" +
|
||||
"If NOT using a Footstep Component:\nPlay a random footstep sound based off of your AI's Walk Sound List."));
|
||||
|
||||
//Play Attack Sound
|
||||
AnimationEvent PlayAttackSound = new AnimationEvent();
|
||||
PlayAttackSound.functionName = "PlayAttackSound";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Play Attack Sound", PlayAttackSound, "Play a random attack sound based off of your AI's Attack Sound List."));
|
||||
|
||||
//Play Sound Effect
|
||||
AnimationEvent PlaySoundEffect = new AnimationEvent();
|
||||
PlaySoundEffect.functionName = "PlaySoundEffect";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Play Sound Effect", PlaySoundEffect, "Play a specified sound from an AI's Sounds List by passing the SoundEffectID.\n\nIntParameter = SoundEffectID"));
|
||||
|
||||
//Play Warning Sound
|
||||
AnimationEvent PlayWarningSound = new AnimationEvent();
|
||||
PlayWarningSound.functionName = "PlayWarningSound";
|
||||
EmeraldAnimationEvents.Add(new EmeraldAnimationEventsClass("Play Warning Sound", PlayWarningSound, "Play a random warning sound based off of your AI's Warning Sound List."));
|
||||
|
||||
return EmeraldAnimationEvents;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8bc209408af88e418c3f14ce2e4b260
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,90 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace EmeraldAI
|
||||
{
|
||||
/// <summary>
|
||||
/// Since most animations are repeated, a parent class is used for each animation category
|
||||
/// (NonCombat, Type 1, and Type 2). Animations that are not used are simply not displayed.
|
||||
/// This also makes for adding new animations with future updates easier.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class AnimationParentClass
|
||||
{
|
||||
/// <summary>
|
||||
/// List of Animations (NonCombat Only)
|
||||
/// </summary>
|
||||
public List<AnimationClass> IdleList = new List<AnimationClass>();
|
||||
|
||||
/// <summary>
|
||||
/// Stationary Idle Animation
|
||||
/// </summary>
|
||||
public AnimationClass IdleStationary;
|
||||
|
||||
/// <summary>
|
||||
/// Warning Animation (Type 1 and Type 2 Only)
|
||||
/// </summary>
|
||||
public AnimationClass IdleWarning;
|
||||
|
||||
/// <summary>
|
||||
/// Walk Animations
|
||||
/// </summary>
|
||||
public AnimationClass WalkLeft, WalkForward, WalkRight, WalkBack;
|
||||
|
||||
/// <summary>
|
||||
/// Run Animations
|
||||
/// </summary>
|
||||
public AnimationClass RunLeft, RunForward, RunRight;
|
||||
|
||||
/// <summary>
|
||||
/// Turn Animations
|
||||
/// </summary>
|
||||
public AnimationClass TurnLeft, TurnRight;
|
||||
|
||||
/// <summary>
|
||||
/// List of Hit Animations
|
||||
/// </summary>
|
||||
public List<AnimationClass> HitList = new List<AnimationClass>();
|
||||
|
||||
/// <summary>
|
||||
/// List of Death Animations
|
||||
/// </summary>
|
||||
public List<AnimationClass> DeathList = new List<AnimationClass>();
|
||||
|
||||
/// <summary>
|
||||
/// Strafe Animations (Type 1 and Type 2 Only)
|
||||
/// </summary>
|
||||
public AnimationClass StrafeLeft, StrafeRight;
|
||||
|
||||
/// <summary>
|
||||
/// Block Animations (Type 1 and Type 2 Only)
|
||||
/// </summary>
|
||||
public AnimationClass BlockIdle, BlockHit;
|
||||
|
||||
/// <summary>
|
||||
/// Dodge Animations (Type 1 and Type 2 Only)
|
||||
/// </summary>
|
||||
public AnimationClass DodgeLeft, DodgeBack, DodgeRight;
|
||||
|
||||
/// <summary>
|
||||
/// Recoil Animation (Type 1 and Type 2 Only)
|
||||
/// </summary>
|
||||
public AnimationClass Recoil;
|
||||
|
||||
/// <summary>
|
||||
/// Stunned Animation (Type 1 and Type 2 Only)
|
||||
/// </summary>
|
||||
public AnimationClass Stunned;
|
||||
|
||||
/// <summary>
|
||||
/// Equip and Unequip Animations (Type 1 and Type 2 Only)
|
||||
/// </summary>
|
||||
public AnimationClass PutAwayWeapon, PullOutWeapon;
|
||||
|
||||
/// <summary>
|
||||
/// List of Attack Animations (Type 1 and Type 2 Only)
|
||||
/// </summary>
|
||||
public List<AnimationClass> AttackList = new List<AnimationClass>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7d616af0e007bdc4a94109ff7e1b8127
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,40 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EmeraldAI
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds all of an AI's attack attack information.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class AttackClass
|
||||
{
|
||||
public int AttackListIndex = 0;
|
||||
public AttackPickTypes AttackPickType = AttackPickTypes.Order;
|
||||
[SerializeField]
|
||||
public List<AttackData> AttackDataList = new List<AttackData>();
|
||||
|
||||
[System.Serializable]
|
||||
public class AttackData
|
||||
{
|
||||
public EmeraldAbilityObject AbilityObject;
|
||||
public int AttackAnimation;
|
||||
public int AttackOdds = 25;
|
||||
public float AttackDistance = 3f;
|
||||
public float TooCloseDistance = 1f;
|
||||
public bool CooldownIgnored;
|
||||
public float CooldownTimeStamp;
|
||||
|
||||
public bool Contains(List<AttackData> m_AttackDataList, AttackData m_AttackDataClass)
|
||||
{
|
||||
foreach (AttackData AttackInfo in m_AttackDataList)
|
||||
{
|
||||
return (AttackInfo == m_AttackDataClass);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec03113c4b005254885582b621087135
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace EmeraldAI
|
||||
{
|
||||
public class EmeraldAnimationEventsClass
|
||||
{
|
||||
public string eventDisplayName;
|
||||
public string eventDescription;
|
||||
public AnimationEvent animationEvent;
|
||||
|
||||
public EmeraldAnimationEventsClass(string m_eventDisplayName, AnimationEvent m_animationEvent, string m_eventDescription)
|
||||
{
|
||||
eventDisplayName = m_eventDisplayName;
|
||||
animationEvent = m_animationEvent;
|
||||
eventDescription = m_eventDescription;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6bd069176478b34bae65fc7826d2215
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace EmeraldAI
|
||||
{
|
||||
[System.Serializable]
|
||||
public class EmoteAnimationClass
|
||||
{
|
||||
public EmoteAnimationClass(int NewAnimationID, AnimationClip NewEmoteAnimationClip)
|
||||
{
|
||||
AnimationID = NewAnimationID;
|
||||
EmoteAnimationClip = NewEmoteAnimationClip;
|
||||
}
|
||||
|
||||
public int AnimationID = 1;
|
||||
public AnimationClip EmoteAnimationClip;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9170614f478a8e44b8fef898167670f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace EmeraldAI
|
||||
{
|
||||
[System.Serializable]
|
||||
public class FactionClass
|
||||
{
|
||||
public int FactionIndex;
|
||||
public RelationTypes RelationType;
|
||||
|
||||
public FactionClass(int m_FactionIndex, int m_RelationType)
|
||||
{
|
||||
FactionIndex = m_FactionIndex;
|
||||
RelationType = (RelationTypes)m_RelationType;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6fb3ed8e04ef6024aa8d3102e80a421d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace EmeraldAI
|
||||
{
|
||||
/// <summary>
|
||||
/// Used through projectiles to cache effects so they can be enabled and disabled when needed.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class ProjectileEffectsClass
|
||||
{
|
||||
public ParticleSystemRenderer EffectParticle;
|
||||
public GameObject EffectObject;
|
||||
|
||||
public ProjectileEffectsClass(ParticleSystemRenderer m_EffectParticle, GameObject m_EffectObject)
|
||||
{
|
||||
EffectParticle = m_EffectParticle;
|
||||
EffectObject = m_EffectObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc221726d07b4ec43be8323a834fcdca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user