|
@@ -29,8 +29,30 @@ public enum ObjType
|
|
|
Flower,
|
|
|
HudText,
|
|
|
FlowerItem,
|
|
|
+
|
|
|
DropGold,
|
|
|
DropDiamond,
|
|
|
+
|
|
|
+ BeeRed,
|
|
|
+ BeeBlue,
|
|
|
+ BeeWhite,
|
|
|
+ BeePurple,
|
|
|
+ BeeYellow,
|
|
|
+
|
|
|
+ ButterflyRed,
|
|
|
+ ButterflyBlue,
|
|
|
+ ButterflyWhite,
|
|
|
+ ButterflyPurple,
|
|
|
+ ButterflyYellow,
|
|
|
+}
|
|
|
+
|
|
|
+public enum AnimColor
|
|
|
+{
|
|
|
+ Red,
|
|
|
+ Blue,
|
|
|
+ White,
|
|
|
+ Purple,
|
|
|
+ Yellow,
|
|
|
}
|
|
|
|
|
|
public class ManaReso : Regist
|
|
@@ -293,6 +315,172 @@ public class ManaReso : Regist
|
|
|
return hudText;
|
|
|
}
|
|
|
|
|
|
+ public static Transform GetBee(AnimColor color, Transform parTra, Transform posTra)
|
|
|
+ {
|
|
|
+ if (color == AnimColor.Red)
|
|
|
+ {
|
|
|
+ Transform tra = Get("BeeRed", Folder.Character, false, parTra, posTra.position, ObjType.BeeRed);
|
|
|
+
|
|
|
+ ObjRoot objRoot = tra.GetComponent<ObjRoot>();
|
|
|
+
|
|
|
+ if (objRoot == null)
|
|
|
+ {
|
|
|
+ tra.AddComponent<ObjRoot>().ObjType = ObjType.BeeRed;
|
|
|
+
|
|
|
+ tra.GetChild(0).AddComponent<AnimationReceiver>();
|
|
|
+ }
|
|
|
+
|
|
|
+ return tra;
|
|
|
+ }
|
|
|
+ else if (color == AnimColor.Blue)
|
|
|
+ {
|
|
|
+ Transform tra = Get("BeeBlue", Folder.Character, false, parTra, posTra.position, ObjType.BeeBlue);
|
|
|
+
|
|
|
+ ObjRoot objRoot = tra.GetComponent<ObjRoot>();
|
|
|
+
|
|
|
+ if (objRoot == null)
|
|
|
+ {
|
|
|
+ tra.AddComponent<ObjRoot>().ObjType = ObjType.BeeBlue;
|
|
|
+
|
|
|
+ tra.GetChild(0).AddComponent<AnimationReceiver>();
|
|
|
+ }
|
|
|
+
|
|
|
+ return tra;
|
|
|
+ }
|
|
|
+ else if (color == AnimColor.White)
|
|
|
+ {
|
|
|
+ Transform tra = Get("BeeWhite", Folder.Character, false, parTra, posTra.position, ObjType.BeeWhite);
|
|
|
+
|
|
|
+ ObjRoot objRoot = tra.GetComponent<ObjRoot>();
|
|
|
+
|
|
|
+ if (objRoot == null)
|
|
|
+ {
|
|
|
+ tra.AddComponent<ObjRoot>().ObjType = ObjType.BeeWhite;
|
|
|
+
|
|
|
+ tra.GetChild(0).AddComponent<AnimationReceiver>();
|
|
|
+ }
|
|
|
+
|
|
|
+ return tra;
|
|
|
+ }
|
|
|
+ else if (color == AnimColor.Purple)
|
|
|
+ {
|
|
|
+ Transform tra = Get("BeePurple", Folder.Character, false, parTra, posTra.position, ObjType.BeePurple);
|
|
|
+
|
|
|
+ ObjRoot objRoot = tra.GetComponent<ObjRoot>();
|
|
|
+
|
|
|
+ if (objRoot == null)
|
|
|
+ {
|
|
|
+ tra.AddComponent<ObjRoot>().ObjType = ObjType.BeePurple;
|
|
|
+
|
|
|
+ tra.GetChild(0).AddComponent<AnimationReceiver>();
|
|
|
+ }
|
|
|
+
|
|
|
+ return tra;
|
|
|
+ }
|
|
|
+ else if (color == AnimColor.Yellow)
|
|
|
+ {
|
|
|
+ Transform tra = Get("BeeYellow", Folder.Character, false, parTra, posTra.position, ObjType.BeeYellow);
|
|
|
+
|
|
|
+ ObjRoot objRoot = tra.GetComponent<ObjRoot>();
|
|
|
+
|
|
|
+ if (objRoot == null)
|
|
|
+ {
|
|
|
+ tra.AddComponent<ObjRoot>().ObjType = ObjType.BeeYellow;
|
|
|
+
|
|
|
+ tra.GetChild(0).AddComponent<AnimationReceiver>();
|
|
|
+ }
|
|
|
+
|
|
|
+ return tra;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ throw new Exception();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static Transform GetButterfly(AnimColor color, Transform parTra, Transform posTra)
|
|
|
+ {
|
|
|
+ if (color == AnimColor.Red)
|
|
|
+ {
|
|
|
+ Transform tra = Get("ButterflyRed", Folder.Character, false, parTra, posTra.position, ObjType.BeeRed);
|
|
|
+
|
|
|
+ ObjRoot objRoot = tra.GetComponent<ObjRoot>();
|
|
|
+
|
|
|
+ if (objRoot == null)
|
|
|
+ {
|
|
|
+ tra.AddComponent<ObjRoot>().ObjType = ObjType.BeeRed;
|
|
|
+
|
|
|
+ tra.GetChild(0).AddComponent<AnimationReceiver>();
|
|
|
+ }
|
|
|
+
|
|
|
+ return tra;
|
|
|
+ }
|
|
|
+ else if (color == AnimColor.Blue)
|
|
|
+ {
|
|
|
+ Transform tra = Get("ButterflyBlue", Folder.Character, false, parTra, posTra.position, ObjType.ButterflyBlue);
|
|
|
+
|
|
|
+ ObjRoot objRoot = tra.GetComponent<ObjRoot>();
|
|
|
+
|
|
|
+ if (objRoot == null)
|
|
|
+ {
|
|
|
+ tra.AddComponent<ObjRoot>().ObjType = ObjType.ButterflyBlue;
|
|
|
+
|
|
|
+ tra.GetChild(0).AddComponent<AnimationReceiver>();
|
|
|
+ }
|
|
|
+
|
|
|
+ return tra;
|
|
|
+ }
|
|
|
+ else if (color == AnimColor.White)
|
|
|
+ {
|
|
|
+ Transform tra = Get("ButterflyWhite", Folder.Character, false, parTra, posTra.position, ObjType.ButterflyWhite);
|
|
|
+
|
|
|
+ ObjRoot objRoot = tra.GetComponent<ObjRoot>();
|
|
|
+
|
|
|
+ if (objRoot == null)
|
|
|
+ {
|
|
|
+ tra.AddComponent<ObjRoot>().ObjType = ObjType.ButterflyWhite;
|
|
|
+
|
|
|
+ tra.GetChild(0).AddComponent<AnimationReceiver>();
|
|
|
+ }
|
|
|
+
|
|
|
+ return tra;
|
|
|
+ }
|
|
|
+ else if (color == AnimColor.Purple)
|
|
|
+ {
|
|
|
+ Transform tra = Get("ButterflyPurple", Folder.Character, false, parTra, posTra.position, ObjType.ButterflyPurple);
|
|
|
+
|
|
|
+ ObjRoot objRoot = tra.GetComponent<ObjRoot>();
|
|
|
+
|
|
|
+ if (objRoot == null)
|
|
|
+ {
|
|
|
+ tra.AddComponent<ObjRoot>().ObjType = ObjType.ButterflyPurple;
|
|
|
+
|
|
|
+ tra.GetChild(0).AddComponent<AnimationReceiver>();
|
|
|
+ }
|
|
|
+
|
|
|
+ return tra;
|
|
|
+ }
|
|
|
+ else if (color == AnimColor.Yellow)
|
|
|
+ {
|
|
|
+ Transform tra = Get("ButterflyYellow", Folder.Character, false, parTra, posTra.position, ObjType.ButterflyYellow);
|
|
|
+
|
|
|
+ ObjRoot objRoot = tra.GetComponent<ObjRoot>();
|
|
|
+
|
|
|
+ if (objRoot == null)
|
|
|
+ {
|
|
|
+ tra.AddComponent<ObjRoot>().ObjType = ObjType.ButterflyYellow;
|
|
|
+
|
|
|
+ tra.GetChild(0).AddComponent<AnimationReceiver>();
|
|
|
+ }
|
|
|
+
|
|
|
+ return tra;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ throw new Exception();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public static Transform GetSkillItem(SkillRoot skillRoot)
|
|
|
{
|
|
|
Transform tra;
|