Skip to content

Commit

Permalink
Decoration animations
Browse files Browse the repository at this point in the history
  • Loading branch information
WyrnCael committed Jun 14, 2018
1 parent 0308485 commit 9d3281b
Show file tree
Hide file tree
Showing 66 changed files with 1,273 additions and 604 deletions.
22 changes: 22 additions & 0 deletions Assets/IsoUnity/Source/EvenManagers/AnimationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@ public override void ReceiveEvent(IGameEvent ev)
AutoAnimator anim = go.GetComponent<AutoAnimator>();
anim.registerEvent(ev);
}

if (ev.Name == "show decoration animation")
{
Decoration dec = (ev.getParameter("objective") as GameObject).GetComponent<Decoration>();

GameObject go = GameObject.CreatePrimitive(PrimitiveType.Quad);
Decoration decoration = go.AddComponent<Decoration>();
decoration.IsoDec = (IsoDecoration)ev.getParameter("animation");

decoration.GetComponent<Renderer>().sharedMaterial = new Material(Shader.Find("Transparent/Cutout/Diffuse"));
decoration.Father = dec;
decoration.adaptate();

AutoAnimator anim = go.AddComponent<AutoAnimator>();
anim.FrameSecuence = new int[8] { 0, 1, 2, 3, 4, 5, 6, 7 };
anim.FrameRate = 0.07f;
anim.AutoDestroy = true;
anim.Repeat = 1;
anim.registerEvent(ev);

go.transform.Translate(new Vector3(0, 0, -2.8f));
}
}

public override void Tick() { }
Expand Down
53 changes: 53 additions & 0 deletions Assets/Scenes/Demo/Animacion_crusader_attack.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d3a9a02dbd6a69445a57c833e33785c1, type: 3}
m_Name: Animacion_crusader_attack
m_EditorClassIdentifier:
loop: 0
frames:
- column: 0
duration: 0.03
- column: 1
duration: 0.03
- column: 2
duration: 0.03
- column: 3
duration: 0.03
- column: 4
duration: 0.03
- column: 5
duration: 0.03
- column: 6
duration: 0.03
- column: 7
duration: 0.03
- column: 8
duration: 0.03
- column: 9
duration: 0.03
- column: 10
duration: 0.03
- column: 11
duration: 0.03
- column: 12
duration: 0.03
- column: 13
duration: 0.03
- column: 14
duration: 0.03
- column: 15
duration: 0.03
- column: 16
duration: 0.03
- column: 0
duration: 0
sheet:
overrideSheet: {fileID: 11400000, guid: 4a34f5e00a36a3d4d9580b54ddb41695, type: 2}
10 changes: 10 additions & 0 deletions Assets/Scenes/Demo/Animacion_crusader_attack.asset.meta

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

49 changes: 49 additions & 0 deletions Assets/Scenes/Demo/Animation_archer_attack.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d3a9a02dbd6a69445a57c833e33785c1, type: 3}
m_Name: Animation_archer_attack
m_EditorClassIdentifier:
loop: 0
frames:
- column: 0
duration: 0.05
- column: 1
duration: 0.05
- column: 2
duration: 0.05
- column: 3
duration: 0.05
- column: 4
duration: 0.05
- column: 5
duration: 0.05
- column: 6
duration: 0.05
- column: 7
duration: 0.05
- column: 8
duration: 0.05
- column: 9
duration: 0.05
- column: 10
duration: 0.05
- column: 11
duration: 0.05
- column: 12
duration: 0.05
- column: 13
duration: 0.05
- column: 14
duration: 0.05
- column: 15
duration: 0.05
sheet:
overrideSheet: {fileID: 11400000, guid: c162fd6e288a5fd46961a7aa03528468, type: 2}
10 changes: 10 additions & 0 deletions Assets/Scenes/Demo/Animation_archer_attack.asset.meta

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

39 changes: 39 additions & 0 deletions Assets/Scenes/Demo/Animation_archer_left.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d3a9a02dbd6a69445a57c833e33785c1, type: 3}
m_Name: Animation_archer_left
m_EditorClassIdentifier:
loop: 0
frames:
- column: 6
duration: 0.05
- column: 7
duration: 0.05
- column: 8
duration: 0.05
- column: 9
duration: 0.05
- column: 10
duration: 0.05
- column: 11
duration: 0.05
- column: 10
duration: 0.05
- column: 9
duration: 0.05
- column: 8
duration: 0.05
- column: 7
duration: 0.05
- column: 6
duration: 0.05
sheet: run
overrideSheet: {fileID: 0}
10 changes: 10 additions & 0 deletions Assets/Scenes/Demo/Animation_archer_left.asset.meta

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

39 changes: 39 additions & 0 deletions Assets/Scenes/Demo/Animation_archer_right.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d3a9a02dbd6a69445a57c833e33785c1, type: 3}
m_Name: Animation_archer_right
m_EditorClassIdentifier:
loop: 0
frames:
- column: 0
duration: 0.05
- column: 1
duration: 0.05
- column: 2
duration: 0.05
- column: 3
duration: 0.05
- column: 4
duration: 0.05
- column: 5
duration: 0.05
- column: 4
duration: 0.05
- column: 3
duration: 0.05
- column: 2
duration: 0.05
- column: 1
duration: 0.05
- column: 0
duration: 0.05
sheet: run
overrideSheet: {fileID: 0}
10 changes: 10 additions & 0 deletions Assets/Scenes/Demo/Animation_archer_right.asset.meta

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

22 changes: 10 additions & 12 deletions Assets/Scenes/Demo/Animation_archer_run.asset
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,24 @@ MonoBehaviour:
- column: 0
duration: 0.05
- column: 1
duration: 0.05
duration: 0.03
- column: 2
duration: 0.05
duration: 0.03
- column: 3
duration: 0.05
duration: 0.03
- column: 4
duration: 0.05
duration: 0.03
- column: 5
duration: 0.05
duration: 0.03
- column: 6
duration: 0.05
duration: 0.03
- column: 7
duration: 0.05
duration: 0.03
- column: 8
duration: 0.05
duration: 0.03
- column: 9
duration: 0.05
duration: 0.03
- column: 10
duration: 0.05
- column: 11
duration: 0.05
duration: 0.03
sheet:
overrideSheet: {fileID: 11400000, guid: 862f95a5b3e081b48abefe6ed5f30358, type: 2}
45 changes: 45 additions & 0 deletions Assets/Scenes/Demo/Animation_crusader_hit.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d3a9a02dbd6a69445a57c833e33785c1, type: 3}
m_Name: Animation_crusader_hit
m_EditorClassIdentifier:
loop: 0
frames:
- column: 0
duration: 0.03
- column: 1
duration: 0.03
- column: 2
duration: 0.03
- column: 3
duration: 0.03
- column: 4
duration: 0.03
- column: 5
duration: 0.03
- column: 6
duration: 0.03
- column: 7
duration: 0.03
- column: 8
duration: 0.03
- column: 9
duration: 0.03
- column: 10
duration: 0.03
- column: 11
duration: 0.03
- column: 12
duration: 0.03
- column: 13
duration: 0.03
sheet:
overrideSheet: {fileID: 11400000, guid: 72f2ab05b7a26ba49bef1986a4f4e9ca, type: 2}
10 changes: 10 additions & 0 deletions Assets/Scenes/Demo/Animation_crusader_hit.asset.meta

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

Loading

0 comments on commit 9d3281b

Please sign in to comment.