object getValueFromDatabase(EAnimationDataType type) { object result = null; if (type == EAnimationDataType.TIME_FRAME) { result = ReadDatabase.Instance.DragonInfo.Player[PlayerInfo.Instance.dragonInfo.id].States[controller.StateAction.ToString().ToUpper()].TimeFrame; } else if (type == EAnimationDataType.EVENT) { System.Collections.Generic.List <object> listEvent = null; listEvent = ReadDatabase.Instance.DragonInfo.Player[PlayerInfo.Instance.dragonInfo.id].States[controller.StateAction.ToString().ToUpper()].listKeyEventFrame; int length = listEvent.Count; for (int i = 0; i < length; i++) { if (listEvent[i].Equals("end")) { listEvent[i] = animationFrames.keyEnd; } } result = listEvent.ToArray(); } return(result); }
object getValueFromDatabase(EAnimationDataType type) { object result = null; if (type == EAnimationDataType.TIME_FRAME) { result = ReadDatabase.Instance.ObjectInfo[controller.ID.ToUpper()].States[currentState.ToString().ToUpper()].TimeFrame; } else if (type == EAnimationDataType.EVENT) { if (ReadDatabase.Instance.ObjectInfo[controller.ID.ToUpper()].States[currentState.ToString().ToUpper()].listKeyEventFrame.Count > 0) { System.Collections.Generic.List<object> listEvent = null; listEvent = ReadDatabase.Instance.SkillInfo[controller.ID.ToUpper()].States[currentState.ToString().ToUpper()].listKeyEventFrame; int length = listEvent.Count; for (int i = 0; i < length; i++) { if (listEvent[i].Equals("end")) listEvent[i] = animationFrames.keyEnd; } result = listEvent.ToArray(); } } else if (type == EAnimationDataType.RESOURCE_PATH) { string s = ReadDatabase.Instance.ObjectInfo[controller.ID.ToUpper()].States[currentState.ToString().ToUpper()].ResourcePath; if ((EObjectState)currentState == EObjectState.EXPLOSION) // Explosion texture { string[] arr = s.Split(' '); result = ConvertSupportor.convertUpperFirstChar(arr[0]) + "/" + arr[1]; } else // Skill texture result = s; } else if (type == EAnimationDataType.SPECIFIC_LOOP) { bool boolResult = false; int[] arrResult = null; AnimationEventState eventState = ReadDatabase.Instance.ObjectInfo[controller.ID.ToUpper()].States[currentState.ToString().ToUpper()]; boolResult = eventState.isSpecificLoop; if (boolResult) { arrResult = new int[eventState.SpecificLoopIndex.Length]; for (int i = 0; i < eventState.SpecificLoopIndex.Length; i++) { arrResult[i] = eventState.SpecificLoopIndex[i]; } } result = new object[] { boolResult, arrResult }; } return result; }
object getValueFromDatabase(EAnimationDataType type) { object result = null; if (type == EAnimationDataType.TIME_FRAME) { result = ReadDatabase.Instance.DragonInfo.Player[PlayerInfo.Instance.dragonInfo.id].States[controller.StateAction.ToString().ToUpper()].TimeFrame; } else if (type == EAnimationDataType.EVENT) { System.Collections.Generic.List<object> listEvent = null; listEvent = ReadDatabase.Instance.DragonInfo.Player[PlayerInfo.Instance.dragonInfo.id].States[controller.StateAction.ToString().ToUpper()].listKeyEventFrame; int length = listEvent.Count; for (int i = 0; i < length; i++) { if (listEvent[i].Equals("end")) listEvent[i] = animationFrames.keyEnd; } result = listEvent.ToArray(); } return result; }
object getValueFromDatabase(EAnimationDataType type) { object result = null; if (type == EAnimationDataType.TIME_FRAME) { if (controller.StateAction != EEnemyStateAction.MOVE) result = ReadDatabase.Instance.EnemyInfo[controller.ID].States[controller.StateAction.ToString().ToUpper()].TimeFrame; else // == MOVE { result = ReadDatabase.Instance.EnemyInfo[controller.ID].States[controller.StateDirection.ToString().ToUpper()].TimeFrame; } } else if (type == EAnimationDataType.EVENT) { System.Collections.Generic.List<object> listEvent = null; if (controller.StateAction != EEnemyStateAction.MOVE) listEvent = ReadDatabase.Instance.EnemyInfo[controller.ID].States[controller.StateAction.ToString().ToUpper()].listKeyEventFrame; else listEvent = ReadDatabase.Instance.EnemyInfo[controller.ID].States[controller.StateDirection.ToString().ToUpper()].listKeyEventFrame; int length = listEvent.Count; for (int i = 0; i < length; i++) { if (listEvent[i].Equals("end")) listEvent[i] = animationFrames.keyEnd; } result = listEvent.ToArray(); } return result; }
object getValueFromDatabase(EAnimationDataType type) { object result = null; if (type == EAnimationDataType.TIME_FRAME) { result = ReadDatabase.Instance.SkillInfo[controller.ID.ToUpper()].States[currentState.ToString().ToUpper()].TimeFrame; } else if (type == EAnimationDataType.EVENT) { if (ReadDatabase.Instance.SkillInfo[controller.ID.ToUpper()].States[currentState.ToString().ToUpper()].listKeyEventFrame.Count > 0) { System.Collections.Generic.List <object> listEvent = null; listEvent = ReadDatabase.Instance.SkillInfo[controller.ID.ToUpper()].States[currentState.ToString().ToUpper()].listKeyEventFrame; int length = listEvent.Count; for (int i = 0; i < length; i++) { if (listEvent[i].Equals("end")) { listEvent[i] = animationFrames.keyEnd; } } result = listEvent.ToArray(); } } else if (type == EAnimationDataType.RESOURCE_PATH) { string s = ReadDatabase.Instance.SkillInfo[controller.ID.ToUpper()].States[currentState.ToString().ToUpper()].ResourcePath; if ((ESkillAction)currentState == ESkillAction.EXPLOSION) // Explosion texture { string[] arr = s.Split(' '); result = ConvertSupportor.convertUpperFirstChar(arr[0]) + "/" + arr[1]; } else // Skill texture { result = s; } } else if (type == EAnimationDataType.SPECIFIC_LOOP) { bool boolResult = false; int[] arrResult = null; AnimationEventState eventState = ReadDatabase.Instance.SkillInfo[controller.ID.ToUpper()].States[currentState.ToString().ToUpper()]; boolResult = eventState.isSpecificLoop; if (boolResult) { arrResult = new int[eventState.SpecificLoopIndex.Length]; for (int i = 0; i < eventState.SpecificLoopIndex.Length; i++) { arrResult[i] = eventState.SpecificLoopIndex[i]; } } result = new object[] { boolResult, arrResult }; } return(result); }