//���һ������ public static ActorData getActorData(string id, string groupid, ActorType type, ActorPro pro) { ActorData data = new ActorData(id); data.GroupID = groupid; data.ActorType = type; data.ActorPro = pro; return data; }
public AscendAction(ActorData actorData, float energyCost, IActionEffectFactory actionEffectFactory, IGameContext gameContext, IEntityDetector entityDetector, IEntityRemover entityRemover, ITextEffectPresenter textEffectPresenter) : base(actorData, energyCost, actionEffectFactory) { _gameContext = gameContext; _entityDetector = entityDetector; _entityRemover = entityRemover; _textEffectPresenter = textEffectPresenter; }
public void CleanSceneAndGameContextAfterDeath(ActorData actorData) { // todo: get rid of this ugly cast _gameContext.Actors.Remove(actorData.Entity as ActorBehaviour); _entityPresenter.RemoveDestroyedEntity(actorData.Entity); GameObject.Destroy(actorData.Entity.gameObject); }
public EatAction(ActorData actorData, float energyCost, IActionEffectFactory actionEffectFactory, INeedHandler needHandler, ITextEffectPresenter textEffectPresenter, IEntityRemover entityRemover, ItemData foodItemToEat) : base(actorData, energyCost, actionEffectFactory) { _needHandler = needHandler; _textEffectPresenter = textEffectPresenter; _entityRemover = entityRemover; _foodItemToEat = foodItemToEat; }
protected override void Awake() { base.Awake(); if (actorId != 0) { actorData = new ActorData(actorId); GameData.enemys.Add(this); } }
public virtual void Configure() { configName = acfg.aspecies.ToString(); ad = new ActorData(); ad.hp = acfg.hp; ad.size = acfg.minSize; ad.stomach = 0; body.UpdateScale(); }
//获得一个数据 public static ActorData getActorData(string id, string groupid, ActorType type, ActorPro pro) { ActorData data = new ActorData(id); data.GroupID = groupid; data.ActorType = type; data.ActorPro = pro; return(data); }
private void Start() { actorData = FindObjects.GameLogic.GetComponent <ActorData>(); if (!LoadedActorData) { Reset(); } }
//For player equipment public void InitPanel(Item item, ActorData data, EquipmentSlottt slot) { this.data = data; this.currItem = item; ItemInit(item); location.text = data.Name + ": " + slot.slotName; }
protected virtual void initActorData() { if (_ActorData == null) { _ActorData = new ActorData(); } //_ActorData._actorGameObject = this.gameObject; //_ActorData._actorGameObjectName = _ActorData._Name; }
public void UninstallTurret(ActorData ship) { ItemInstance temp = new ItemInstance(turret as TurretItem, 1); new ItemEvents().ItemPickupEvent(temp, ship.gameObject); this.turret = null; Destroy(transform.GetChild(0).gameObject); new TurretEvents().TurretUninstallSuccsessEvent(turret); }
public ActorData GetData(uint id) { ActorData ad = null; if(!data.TryGetValue(id, out ad)) { ad = GetActorInfo(id); } return ad; }
public OpenDoorAction(ActorData actorData, Vector2Int targetPosition, bool isHorizontal, bool isHeavyDoor, float energyCost, IActionEffectFactory actionEffectFactory, IGameContext gameContext) : base(actorData, energyCost, actionEffectFactory) { _targetPosition = targetPosition; _isHorizontal = isHorizontal; _isHeavyDoor = isHeavyDoor; _gameContext = gameContext; }
public void Fill(ActorData data) { ActorName = data.ActorName; ActorPopular = data.ActorPopular; IncomeBonus = data.IncomeBonus; SecretaryName = data.SecretaryName; GuardName = data.GuardName; ActorHonorName = data.ActorHonorName; }
public StrikeEffect(ActorData actorData, ActorData attackedActor, bool parried, bool isDaringBlow, IWeaponColorizer weaponColorizer) { _parried = parried; _isDaringBlow = isDaringBlow; _weaponColorizer = weaponColorizer; _attackedActorLogicalPosition = attackedActor.LogicalPosition; _actorBehaviour = actorData.Entity as ActorBehaviour; _attackedActorBehaviour = attackedActor.Entity as ActorBehaviour; }
public TempSummonCombatNode(Actor source, TileNode targetedTile, ActorData actorData, int duration) : base(source, targetedTile, actorData) { Buff buff = new Buff("Temporary Summon", "unkown"); buff.effects.Add(new BanishEffect(duration)); actorData.buffContainer.ApplyBuff(actorData, source.actorData, buff); }
internal void ExecuteReactionHitsWithExtraFlagsOnActor( ActorData targetActor, ActorData caster, bool hasDamage, bool hasHealing) { ClientResolutionAction.ExecuteReactionHitsWithExtraFlagsOnActorAux(m_actorToHitResults, targetActor, caster, hasDamage, hasHealing); }
public Vector2Int?ResolveNextStep(ActorData actorData) { if (actorData.NavigationData.Destination.Value == actorData.LogicalPosition) { throw new InvalidOperationException("Actor destination is same as his position: " + actorData.LogicalPosition); } NavigationData navigationData = actorData.NavigationData; var currentPosition = actorData.LogicalPosition; bool hasPathToTarget = navigationData.PathToFollow != null; if (!hasPathToTarget) { List <Vector2Int> jumpPointsToTarget = GetPath(currentPosition, navigationData.Destination.Value); if (jumpPointsToTarget == null) { return(null); } navigationData.PathToFollow = jumpPointsToTarget; } bool isAtNextNode = currentPosition == navigationData.NextNode; if (isAtNextNode) { navigationData.PathToFollow.RemoveAt(0); } bool isOutOfPath = navigationData.StepsToNextNode == null || !navigationData.StepsToNextNode.Any() || (navigationData.StepsToNextNode.Count > 0 && currentPosition != navigationData.StepsToNextNode.Peek()); if (isAtNextNode || isOutOfPath) { // walking from jump point to jump point generates unnatural movement — thus we generate a natural straight line for the // player to follow. It's symmetrical (in terms of walking cost) to the line connecting the jump points and it usually omits // the next jump point, so we have to reassign NextNode. IList <Vector2Int> naturalLineToWalk = _naturalLineCreator.GetFirstLongestNaturalLine( currentPosition, navigationData.PathToFollow, _gridInfoProvider.IsWalkable); if (naturalLineToWalk == null) // there may be no natural line when actor has been moved (pushed, displaced etc.) { return(RecalculateNextStep(actorData, navigationData)); } navigationData.NextNode = naturalLineToWalk.Last(); if (navigationData.PathToFollow.Count > 1 && navigationData.NextNode == navigationData.PathToFollow[1]) { // if we can reach the second jump point in the list by walking the natural line, // we should remove the first node because it's redundant navigationData.PathToFollow.RemoveAt(0); } navigationData.StepsToNextNode = new Stack <Vector2Int>(naturalLineToWalk.Reverse()); } navigationData.StepsToNextNode.Pop(); Vector2Int nextStep = navigationData.StepsToNextNode.Peek(); return(nextStep); }
public ModifyActorAction(TDocument doc, TActor actor) { this.document = doc; this.actor = actor; this.original = new ActorData(); this.final = new ActorData(); setOriginalData(actor); }
public void SellButtonClicked(Item it, ItemContainer currContainer, ActorData actor) { // currItem = currContainer; itemLocation = actor; jobsAllowed.InitPanel(it); itemDetailPanel.InitPanel(it); }
public void SelectedActor(ActorData data) { portrait.sprite = Globals.GetSprite(FilePath.ActorSpriteAtlas, data.portraitFilePath); PrintJobs(data); PrintEquipement(data); PrintStats(data); InitDropDowns(data); currActor = data; }
public PickUpAction(ActorData actorData, float energyCost, ItemData itemToPickUp, IActionEffectFactory actionEffectFactory, IEntityRemover entityRemover, IUiConfig uiConfig, IGameContext gameContext) : base(actorData, energyCost, actionEffectFactory) { ItemToPickUp = itemToPickUp; _entityRemover = entityRemover; _uiConfig = uiConfig; _gameContext = gameContext; }
public override void OnApply(ActorData actor, ActorData source) { OnRemove(actor); if (Globals.currState == GameState.Combat) { GenerateTileNodeDictionary(actor, actor.gridPosX, actor.gridPosY); } }
public void RemoveBuff(ActorData actor, Buff buffToRemove) { if (buffList.Remove(buffToRemove)) { buffToRemove.RemoveBuff(actor); Debug.Log(buffToRemove.buffName + " removed."); } }
public void OnStartTurn(ActorData actor) { int count = buffList.Count - 1; for (int i = count; i >= 0; i--) { buffList[i].OnStartTurn(actor); } }
private BittrexData.Models.ActorDataDto ActorToDbModel(ActorData actorData) { var config = new MapperConfiguration(cfg => { cfg.CreateMap <ActorData, BittrexData.Models.ActorDataDto>() .ForMember(x => x.Account, x => x.MapFrom(m => m.Account)) .ForMember(x => x.Transactions, x => x.MapFrom(m => m.Transactions)) .ForMember(x => x.Predictions, x => x.MapFrom(m => m.Predictions)) .ForMember(x => x.Rules, x => x.MapFrom(m => m.Rules)) .AfterMap((src, dest) => { foreach (var t in dest.Transactions) { t.ActorData = dest; t.ActorDataGuid = dest.Guid; } foreach (var t in dest.Rules) { t.ActorData = dest; t.ActorDataGuid = dest.Guid; } foreach (var t in dest.Predictions) { t.ActorData = dest; t.ActorDataGuid = dest.Guid; } dest.Account.ActorData = dest; dest.Account.ActorDataGuid = dest.Guid; }); cfg.CreateMap <Account, BittrexData.Models.AccountDto>(); cfg.CreateMap <Transaction, BittrexData.Models.TransactionDto>(); cfg.CreateMap <BalancedRule, BittrexData.Models.BalancedRuleDto>(); cfg.CreateMap <Prediction, BittrexData.Models.PredictionDto>() .ForMember(x => x.RulePredictions, x => x.MapFrom(m => m.RulePredictions)) .AfterMap((src, dest) => { foreach (var s in dest.RulePredictions) { s.PredictionGuid = src.Guid; s.Prediction = dest; } }); cfg.CreateMap <KeyValuePair <string, double>, BittrexData.Models.PredictionUnitDto>() .ForMember(x => x.RuleName, x => x.MapFrom(m => m.Key)) .ForMember(x => x.Coefficient, x => x.MapFrom(m => m.Value)) .ForMember(x => x.Guid, x => x.MapFrom(m => Guid.NewGuid())); }); var mapper = new Mapper(config); var dataDto = mapper.Map <BittrexData.Models.ActorDataDto>(actorData); return(dataDto); }
/* Returns a new actor with next Id*/ public ActorData CreateActor() { ActorData dat = new ActorData(); dat.id = NextActorId(); dat.healthMax = 100; dat.health = 100; return(dat); }
public static bool IsPlayerControlled(ActorData actor) { bool flag = false; if (actor != null) { flag = actor.PlayerIndex != PlayerData.s_invalidPlayerIndex; } return(flag); }
public static bool IsHumanControlled(ActorData actor) { bool flag = false; if (actor != null) { flag = actor.method_67(); } return(flag); }
/// <summary> /// 拷贝 /// </summary> /// <param name="data"></param> public void CopyTo(ActorData data) { data.cfg = cfg; data.name = name; data.level = level; data.HP = HP; data.attack = attack; data.moveSpeed = moveSpeed; data.attackSpeed = attackSpeed; }
public static bool IsBot(ActorData actor) { bool flag = false; if (actor != null) { flag = actor.GetComponent <BotController>() != null; } return(flag); }
public ActorLogicData(string uid, ActorData actorData, List<SkillLogicDataBase> skillList) { this.UID = uid; this.m_ActorData = actorData; this.m_SkillList = skillList; }
public ActorLogicData(ActorData actorData, List<SkillLogicDataBase> skillList) { this.m_ActorData = actorData; this.m_SkillList = skillList; }
/// <summary> /// Creates new RP character, based on actor data. /// </summary> /// <param name="actorData">The data to base this character on.</param> /// <param name="actor">Character of the player who gets control over this RP character.</param> /// <param name="name">The RP character's full name, use null for default.</param> /// <example> /// var character = new RpCharacter(AuraData.ActorDb.Find("#tarlach"), "Tarlach (FooBar)", fooBar); /// </example> public RpCharacter(ActorData actorData, Creature actor, string name) { if (actorData == null) throw new ArgumentNullException("actorData"); if (actor == null) throw new ArgumentNullException("actor"); if (actor.Client is DummyClient) throw new InvalidOperationException("Actor must be a player with a valid client."); var rnd = RandomProvider.Get(); this.ActorData = actorData; this.Actor = actor; this.EntityId = NPC.GetNewNpcEntityId(); this.RaceId = actorData.RaceId; this.LoadDefault(); // Name if (!string.IsNullOrWhiteSpace(name)) { this.Name = name; } else { // Use actor data's local name or fall back to race's name. var characterName = actorData.LocalName ?? this.RaceData.Name; var actorName = this.Actor.Name; this.Name = string.Format("{0} ({1})", Localization.Get(characterName), actorName); } // State this.State |= CreatureStates.InstantNpc; this.State |= CreatureStates.EnableCommonPvp; // Default location this.SetLocation(this.Actor.GetLocation()); // Color if (actorData.HasColors) { this.Color1 = actorData.Color1; this.Color2 = actorData.Color2; this.Color3 = actorData.Color3; } // Body this.Height = actorData.Height; this.Weight = actorData.Weight; this.Upper = actorData.Upper; this.Lower = actorData.Lower; this.EyeColor = (byte)actorData.EyeColor; this.EyeType = (short)actorData.EyeType; this.MouthType = (byte)actorData.MouthType; this.SkinColor = (byte)actorData.SkinColor; // Titles this.Titles.SelectedTitle = (ushort)actorData.Title; // Stats this.Age = (short)actorData.Age; this.Level = (short)actorData.Level; this.Exp = AuraData.ExpDb.GetTotalForNextLevel(this.Level - 1); this.AbilityPoints = (short)actorData.AP; this.LifeMaxBase = actorData.Life; this.ManaMaxBase = actorData.Mana; this.StaminaMaxBase = actorData.Stamina; this.StrBase = actorData.Str; this.IntBase = actorData.Int; this.DexBase = actorData.Dex; this.WillBase = actorData.Will; this.LuckBase = actorData.Luck; // Hair and Face if (actorData.FaceItemId != 0) { var face = new Item(actorData.FaceItemId); face.Info.Color1 = (byte)actorData.SkinColor; this.Inventory.Add(face, Pocket.Face); } if (actorData.HairItemId != 0) { var hair = new Item(actorData.HairItemId); hair.Info.Color1 = actorData.HairColor; this.Inventory.Add(hair, Pocket.Hair); } // Items foreach (var itemData in actorData.Items) { var item = new Item(itemData.ItemId); item.Info.State = (byte)itemData.State; item.Info.Amount = (ushort)itemData.Amount; if (item.Data.StackType != StackType.Sac && item.Info.Amount < 1) item.Info.Amount = 1; if (itemData.HasColors) { item.Info.Color1 = itemData.Color1; item.Info.Color2 = itemData.Color2; item.Info.Color3 = itemData.Color3; } var pocket = (Pocket)itemData.Pocket; if (pocket != Pocket.None) this.Inventory.Add(item, pocket); } // Skills this.Skills.Add(SkillId.CombatMastery, SkillRank.Novice, this.RaceId); foreach (var skillData in this.RaceData.Skills) this.Skills.Add((SkillId)skillData.SkillId, (SkillRank)skillData.Rank, this.RaceId); foreach (var skillData in actorData.Skills) this.Skills.Add(skillData.SkillId, skillData.Rank, this.RaceId); // Max stats out after skills and items were added (bonuses). this.Life = this.LifeMax; this.Mana = this.ManaMax; this.Stamina = this.StaminaMax; this.Client = actor.Client; }
/// <summary> /// Creates new NPC from actor data. /// </summary> /// <param name="actorData"></param> public NPC(ActorData actorData) : this(actorData.RaceId) { if (actorData.HasColors) { this.Color1 = actorData.Color1; this.Color2 = actorData.Color2; this.Color3 = actorData.Color3; } this.Height = actorData.Height; this.Weight = actorData.Weight; this.Upper = actorData.Upper; this.Lower = actorData.Lower; this.EyeColor = (byte)actorData.EyeColor; this.EyeType = (short)actorData.EyeType; this.MouthType = (byte)actorData.MouthType; this.SkinColor = (byte)actorData.SkinColor; this.Titles.SelectedTitle = (ushort)actorData.Title; this.Age = (short)actorData.Age; this.Level = (short)actorData.Level; this.AbilityPoints = (short)actorData.AP; this.LifeMaxBase = actorData.Life; this.ManaMaxBase = actorData.Mana; this.StaminaMaxBase = actorData.Stamina; this.StrBase = actorData.Str; this.IntBase = actorData.Int; this.DexBase = actorData.Dex; this.WillBase = actorData.Will; this.LuckBase = actorData.Luck; // Hair and Face if (actorData.FaceItemId != 0) { var face = new Item(actorData.FaceItemId); face.Info.Color1 = (byte)actorData.SkinColor; this.Inventory.Add(face, Pocket.Face); } if (actorData.HairItemId != 0) { var hair = new Item(actorData.HairItemId); hair.Info.Color1 = actorData.HairColor; this.Inventory.Add(hair, Pocket.Hair); } // Items foreach (var itemData in actorData.Items) { var item = new Item(itemData.ItemId); item.Info.State = (byte)itemData.State; item.Info.Amount = (ushort)itemData.Amount; if (item.Data.StackType != StackType.Sac && item.Info.Amount < 1) item.Info.Amount = 1; if (itemData.HasColors) { item.Info.Color1 = itemData.Color1; item.Info.Color2 = itemData.Color2; item.Info.Color3 = itemData.Color3; } var pocket = (Pocket)itemData.Pocket; if (pocket != Pocket.None) this.Inventory.Add(item, pocket); } // Skills foreach (var skillData in actorData.Skills) this.Skills.Add(skillData.SkillId, skillData.Rank, this.RaceId); // Max out after skills and items were added (bonuses) this.Life = this.LifeMax; this.Mana = this.ManaMax; this.Stamina = this.StaminaMax; }
/// <summary> /// Creates new NPC from actor data. /// </summary> /// <param name="actorData"></param> public NPC(ActorData actorData) : this(actorData.RaceId) { if (actorData.HasColors) { this.Color1 = actorData.Color1; this.Color2 = actorData.Color2; this.Color3 = actorData.Color3; } this.Height = actorData.Height; this.Weight = actorData.Weight; this.Upper = actorData.Upper; this.Lower = actorData.Lower; this.EyeColor = (byte)actorData.EyeColor; this.EyeType = (short)actorData.EyeType; this.MouthType = (byte)actorData.MouthType; this.SkinColor = (byte)actorData.SkinColor; if (actorData.FaceItemId != 0) { var face = new Item(actorData.FaceItemId); face.Info.Color1 = (byte)actorData.SkinColor; this.Inventory.Add(face, Pocket.Face); } if (actorData.HairItemId != 0) { var hair = new Item(actorData.HairItemId); hair.Info.Color1 = actorData.HairColor; this.Inventory.Add(hair, Pocket.Hair); } foreach (var itemData in actorData.Items) { var item = new Item(itemData.ItemId); if (itemData.HasColors) { item.Info.Color1 = itemData.Color1; item.Info.Color2 = itemData.Color2; item.Info.Color3 = itemData.Color3; } var pocket = (Pocket)itemData.Pocket; if (pocket != Pocket.None) this.Inventory.Add(item, pocket); } }
private void ParseActorTable(DataTable actorTable) { this.m_ActorDic = new Dictionary<int, ActorData>(); foreach (DataRow row in actorTable.Rows) { ActorData data = new ActorData() { ID = int.Parse(row["ID"].ToString()), Name = row["Name"].ToString(), Description = row["Description"].ToString(), Icon = row["Icon"].ToString(), Texture = row["Texture"].ToString(), Model = true ? null : row["Model"].ToString(), Profession = row.IsNull("Profession") ? (ProfessionType?)null : (ProfessionType)Enum.Parse(typeof(ProfessionType), row["Profession"].ToString()), Nationality = row.IsNull("Nationality") ? (NationalityType?)null : (NationalityType)Enum.Parse(typeof(NationalityType), row["Nationality"].ToString()), Color = (ColorType)Enum.Parse(typeof(ColorType), row["Color"].ToString()), Sex = row.IsNull("Sex") ? (SexType?)null : (SexType)Enum.Parse(typeof(SexType), row["Sex"].ToString()), Quality = byte.Parse(row["Quality"].ToString()), LV = byte.Parse(row["LV"].ToString()), #region 1级属性 L1MainAttribute = row.IsNull("L1MainAttribute") ? (AttributeType?)null : (AttributeType)Enum.Parse(typeof(AttributeType), row["L1MainAttribute"].ToString()), Power = int.Parse(row["Power"].ToString()), IQ = int.Parse(row["IQ"].ToString()), Agile = int.Parse(row["Agile"].ToString()), Physique = int.Parse(row["Physique"].ToString()), #endregion #region 2级属性 HP = int.Parse(row["HP"].ToString()), AP = int.Parse(row["AP"].ToString()), PhysicsDEF = int.Parse(row["PhysicsDEF"].ToString()), MagicDEf = int.Parse(row["MagicDEf"].ToString()), Speed = int.Parse(row["Speed"].ToString()), Hit = float.Parse(row["Hit"].ToString()), Dodge = float.Parse(row["Dodge"].ToString()), Critical = float.Parse(row["Critical"].ToString()), OpposeCritical = float.Parse(row["OpposeCritical"].ToString()), CriticalDamge = float.Parse(row["CriticalDamge"].ToString()), CriticalDamgeCounteract = float.Parse(row["CriticalDamgeCounteract"].ToString()), Heal = float.Parse(row["Heal"].ToString()), BeHealed = float.Parse(row["BeHealed"].ToString()), Block = float.Parse(row["Block"].ToString()), Broken = float.Parse(row["Broken"].ToString()), SpecialAttribute = int.Parse(row["SpecialAttribute"].ToString()), #endregion }; string[] weapons = row["EnableWeaponTypes"].ToString().Split(ConfigConst.SplitChar); data.EnableWeaponTypes = new WeaponType[weapons.Length]; for (int i = 0; i < weapons.Length; i++) { data.EnableWeaponTypes[i] = (WeaponType)Enum.Parse(typeof(WeaponType), weapons[i]); } string[] skillStrs = row["Skills"].ToString().Split(ConfigConst.SplitChar); data.Skills = new int[skillStrs.Length]; for (int i = 0; i < skillStrs.Length; i++) { data.Skills[i] = int.Parse(skillStrs[i]); } if (this.m_ActorDic.ContainsKey(data.ID)) { Debug.LogError(actorTable.TableName + " 重复ID " + data.ID); } else { this.m_ActorDic.Add(data.ID, data); } } }
protected void DrawCutsceneStep() { //EDIT : San 20140513, edit Layout if( SelectedNote != -1 ) { currentStep = SongPlayer.Song.Notes[ SelectedNote ].Step; } CutsceneStep step = currentStep; if( step != null) { Color bgrndBak = GUI.backgroundColor; //Color colorBak = GUI.color; GUI.backgroundColor = LcCutsceneEditor.selectedId == step.stepId ? Color.cyan : bgrndBak; //GUI.color = colorBak; // // GUI.color = step.actor != null ? step.actor.symbolColor : colorBak; // if (GUILayout.Button ("", GUILayout.Width(20))) { // SelectStep(step.stepId); // } // step.stepId = EditorGUILayout.IntField(step.stepId); // step.preId = EditorGUILayout.IntField("Prev Id:", step.preId); // step.delay = EditorGUILayout.FloatField("Delay:", step.delay); EditorGUILayout.BeginVertical("button"); { EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Actor: ",GUILayout.Width(50)); step.actor = (ActorBase) EditorGUILayout.ObjectField(step.actor, typeof(ActorBase), true , GUILayout.Width(150)); EditorGUILayout.LabelField("WithAction: ",GUILayout.Width(80)); step.boolVal = EditorGUILayout.Toggle(step.boolVal,GUILayout.Width(50)); } if( step.actor != null ) { if( step.actor.objIncludeActor != null ) { step.actor = step.actor.objIncludeActor; } } tempAcitonDisplay = CutsceneStep.ConverterActionIDToActionDisplayID(step.action); EditorGUILayout.LabelField("Action: ",GUILayout.Width(50)); tempAcitonDisplay = (CutsceneStep.ActionDisplay) EditorGUILayout.EnumPopup(tempAcitonDisplay, GUILayout.Width(100)); step.action = CutsceneStep.ConverterActionDisplayIDToActionID(tempAcitonDisplay); EditorGUILayout.EndHorizontal(); ActorChar actorChar = null; if (step.actor != null){ actorChar = step.actor.GetComponent<ActorChar>(); } switch (step.action) { case CutsceneStep.Action.MoveTo: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Speed:",GUILayout.Width(50)); step.floatVal = EditorGUILayout.FloatField(step.floatVal, GUILayout.Width(70)); EditorGUILayout.LabelField(" Pos:",GUILayout.Width(40)); step.pos = EditorGUILayout.Vector3Field("",step.pos); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.position; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.position = step.pos; } }EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("MovePosTransform : ",GUILayout.Width(130)); step.target = (Transform) EditorGUILayout.ObjectField( step.target , typeof(Transform), true); if( step.target != null ) { step.pos = step.target.position; // step.pos.x = step.target.position. x; // step.pos.x = step.target.position.x; // step.pos.x = step.target.position.x; } EditorGUILayout.LabelField("Path:", GUILayout.Width(40)); step.obj = EditorGUILayout.ObjectField( step.obj, typeof(LcPath), true); EditorGUILayout.LabelField("EaseType:", GUILayout.Width(60)); step.easeType = (iTween.EaseType) EditorGUILayout.EnumPopup(step.easeType); }EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.JumpTo: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Speed:",GUILayout.Width(50)); step.floatVal = EditorGUILayout.FloatField(step.floatVal, GUILayout.Width(70)); EditorGUILayout.LabelField(" Pos:",GUILayout.Width(40)); step.pos = EditorGUILayout.Vector3Field("",step.pos); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.position; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.position = step.pos; } }EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.GoBack: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Speed:",GUILayout.Width(50)); step.floatVal = EditorGUILayout.FloatField(step.floatVal, GUILayout.Width(70)); EditorGUILayout.LabelField("EaseType:", GUILayout.Width(60)); step.easeType = (iTween.EaseType) EditorGUILayout.EnumPopup(step.easeType,GUILayout.Width(300)); } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.WaitFor: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Target:", GUILayout.Width(50)); step.target = (Transform) EditorGUILayout.ObjectField(step.target, typeof(Transform), true); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } EditorGUILayout.LabelField("Offset:", GUILayout.Width(50)); step.pos = EditorGUILayout.Vector3Field("",step.pos); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.position - step.target.position; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.position = step.target.position + step.pos; } } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.Follow: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Target:", GUILayout.Width(50)); step.target = (Transform) EditorGUILayout.ObjectField(step.target, typeof(Transform), true); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } EditorGUILayout.LabelField("Offset:", GUILayout.Width(50)); step.pos = EditorGUILayout.Vector3Field("",step.pos); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.position - step.target.position; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.position = step.target.position + step.pos; } } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Speed:",GUILayout.Width(50)); step.floatVal = EditorGUILayout.FloatField(step.floatVal, GUILayout.Width(70)); } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.Rotate: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Angle:", GUILayout.Width(50)); step.pos = EditorGUILayout.Vector3Field("",step.pos); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.eulerAngles; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.eulerAngles = step.pos; } } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.Caption: EditorGUILayout.BeginHorizontal(); { if (dialogs != null) EditorGUILayout.LabelField("Dialog:", GUILayout.Width(60)); step.intVal = EditorGUILayout.IntPopup(step.intVal, dialogs, dialogIds); EditorGUILayout.LabelField("Duration:", GUILayout.Width(60)); step.floatVal = EditorGUILayout.FloatField(step.floatVal,GUILayout.Width(50)); } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.TalkTo: case CutsceneStep.Action.SpeechTo: if (step.actor != null) { ReadActionData(step.actor); if (dialogs != null) EditorGUILayout.BeginHorizontal(); { if (dialogs != null) EditorGUILayout.LabelField("Dialog:", GUILayout.Width(50)); step.intVal = EditorGUILayout.IntPopup(step.intVal, dialogs, dialogIds); EditorGUILayout.LabelField("Duration:", GUILayout.Width(60)); step.floatVal = EditorGUILayout.FloatField(step.floatVal,GUILayout.Width(50)); EditorGUILayout.LabelField("NextLoopAction:", GUILayout.Width(100)); step.boolVal = EditorGUILayout.Toggle( step.boolVal); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Target:", GUILayout.Width(50)); step.target = (Transform) EditorGUILayout.ObjectField(step.target, typeof(Transform), true); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } if (actorChar != null && actorChar.actionNames != null){ EditorGUILayout.LabelField("Action:", GUILayout.Width(50)); step.intVal2 = EditorGUILayout.IntPopup( step.intVal2, actorChar.actionNames, actorChar.actionIds); }else{ EditorGUILayout.LabelField("Action:", GUILayout.Width(50)); step.intVal2 = EditorGUILayout.IntField( step.intVal2); } } EditorGUILayout.EndHorizontal(); } break; case CutsceneStep.Action.Action: if (step.actor != null) { if (actorChar != null) { ReadActionData(step.actor); } EditorGUILayout.BeginHorizontal(); { if (actorChar != null && actorChar.actionNames != null) { EditorGUILayout.LabelField("Action:", GUILayout.Width(50)); //Debug.Log ("actorChar.actionNames = "+actorChar.actionNames); step.intVal = EditorGUILayout.IntPopup( step.intVal, actorChar.actionNames, actorChar.actionIds); }else{ EditorGUILayout.LabelField("Action:", GUILayout.Width(50)); step.intVal = EditorGUILayout.IntField( step.intVal); } if (dialogs != null){ EditorGUILayout.LabelField("Dialog:", GUILayout.Width(50)); step.intVal2 = EditorGUILayout.IntPopup( step.intVal2, dialogs, dialogIds); } } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("NextLoopAction:", GUILayout.Width(95)); step.boolVal = EditorGUILayout.Toggle(step.boolVal, GUILayout.Width(50)); EditorGUILayout.LabelField("Ignore Blink:", GUILayout.Width(70)); step.boolVal2 = EditorGUILayout.Toggle( step.boolVal2, GUILayout.Width(10)); } EditorGUILayout.EndHorizontal(); } break; case CutsceneStep.Action.LoopAction: if (step.actor != null) { if (actorChar != null) ReadLoopActionData(step.actor); EditorGUILayout.BeginHorizontal(); { if (actorChar != null && actorChar.loopActionNames != null){ EditorGUILayout.LabelField("Loop Action:", GUILayout.Width(80)); step.intVal = EditorGUILayout.IntPopup( step.intVal,actorChar.loopActionNames, actorChar.loopActionIds); }else{ EditorGUILayout.LabelField("Loop Action:", GUILayout.Width(80)); step.intVal = EditorGUILayout.IntField( step.intVal); } } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Ignore Blink:", GUILayout.Width(70)); step.boolVal = EditorGUILayout.Toggle( step.boolVal, GUILayout.Width(10)); } EditorGUILayout.EndHorizontal(); } break; case CutsceneStep.Action.LoadScene: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Name:", GUILayout.Width(40)); step.strVal = EditorGUILayout.TextField( step.strVal); EditorGUILayout.LabelField("Effect:", GUILayout.Width(40)); step.intVal = EditorGUILayout.IntField(step.intVal, GUILayout.Width(200)); EditorGUILayout.LabelField("Param:", GUILayout.Width(40)); step.strVal2 = EditorGUILayout.TextField( step.strVal2); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Return Cutscene:", GUILayout.Width(100)); step.obj = EditorGUILayout.ObjectField(step.obj, typeof(CutsceneMgr), true,GUILayout.Width(200)); } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.Setup: EditorGUILayout.BeginHorizontal(); { if (GUILayout.Button("Save", GUILayout.Width(80))) { if (step.actor == null) { UnityEngine.Object[] objs = GameObject.FindObjectsOfType(typeof(ActorBase)); step.actorData = new ActorData[objs.Length]; for (int i = 0; i < objs.Length; i++) { ActorBase actor = (ActorBase) objs[i]; ActorData data = new ActorData(); data.actor = actor; data.pos = actor.transform.position; data.rota = actor.transform.rotation; data.scale = actor.transform.localScale; step.actorData[i] = data; } } else { step.actorData = new ActorData[1]; ActorBase actor = step.actor; ActorData data = new ActorData(); data.actor = actor; data.pos = actor.transform.position; data.rota = actor.transform.rotation; data.scale = actor.transform.localScale; step.actorData[0] = data; } } if (GUILayout.Button("Apply", GUILayout.Width(80))) { foreach (ActorData data in step.actorData) { if (data.actor != null) { data.actor.transform.position = data.pos; data.actor.transform.rotation = data.rota; data.actor.transform.localScale = data.scale; } } } } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.LookAt: step.intVal = EditorGUILayout.IntPopup(step.intVal, lookAtNames, lookAtIds, GUILayout.Width(100)); switch (step.intVal) { case 0: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Target:", GUILayout.Width(50)); step.target = (Transform) EditorGUILayout.ObjectField( step.target, typeof(Transform), true, GUILayout.Width(350)); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } } EditorGUILayout.EndHorizontal(); break; case 1: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Target:", GUILayout.Width(50)); step.target = (Transform) EditorGUILayout.ObjectField(step.target, typeof(Transform), true, GUILayout.Width(350)); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } EditorGUILayout.LabelField("pos:", GUILayout.Width(50)); step.pos = EditorGUILayout.Vector3Field("", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { if (step.target != null) step.pos = step.target.position; } } EditorGUILayout.EndHorizontal(); break; } /* step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true); step.pos = EditorGUILayout.Vector3Field("Pos:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Current", GUILayout.Width(80))) { step.pos = step.target.position; } step.boolVal = EditorGUILayout.Toggle("Position", step.boolVal);*/ break; case CutsceneStep.Action.Activate: step.intVal = EditorGUILayout.IntPopup(step.intVal, sendToNames, actionIds, GUILayout.Width(100)); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Target:", GUILayout.Width(50)); step.target = (Transform) EditorGUILayout.ObjectField( step.target, typeof(Transform), true); } EditorGUILayout.EndHorizontal(); // if( step.target != null ) // { // ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); // if( temptarget != null ) // { // if( temptarget.objIncludeActor != null ) // { // step.target = temptarget.objIncludeActor.transform; // } // } // } switch (step.intVal) { case 0: case 2: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Wait", GUILayout.Width(50)); step.boolVal = EditorGUILayout.Toggle( step.boolVal); } EditorGUILayout.EndHorizontal(); break; } if (step.intVal == 2) { EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Method:", GUILayout.Width(50)); step.strVal = EditorGUILayout.TextField( step.strVal); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Param:", GUILayout.Width(50)); step.strVal2 = EditorGUILayout.TextField( step.strVal2); } EditorGUILayout.EndHorizontal(); } break; case CutsceneStep.Action.Proc: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Name:", GUILayout.Width(50)); step.strVal = EditorGUILayout.TextField( step.strVal,GUILayout.Width(150)); EditorGUILayout.LabelField("Param:", GUILayout.Width(50)); step.strVal2 = EditorGUILayout.TextField( step.strVal2,GUILayout.Width(300)); EditorGUILayout.LabelField("Wait", GUILayout.Width(50)); step.boolVal = EditorGUILayout.Toggle(step.boolVal); } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.Sound: // step.intVal = EditorGUILayout.IntPopup(step.intVal, soundNames, actionIds, GUILayout.Width(80)); // step.obj = EditorGUILayout.ObjectField("Clip:", step.obj, typeof(AudioClip), false); // if (step.intVal == 0) // step.boolVal = EditorGUILayout.Toggle("Loop", step.boolVal); // // else if (step.intVal == 1) // { // step.obj = EditorGUILayout.ObjectField("Clip:", step.obj, typeof(AudioClip), false); // } // step.floatVal = EditorGUILayout.FloatField("Volume:", step.floatVal, GUILayout.Width(200)); step.intVal = EditorGUILayout.IntPopup(step.intVal, soundNames, actionIds, GUILayout.Width(80)); if (step.intVal == 0) { EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Clip:", GUILayout.Width(50)); step.obj = EditorGUILayout.ObjectField(step.obj, typeof(AudioClip), false); EditorGUILayout.LabelField("Loop", GUILayout.Width(50)); step.boolVal = EditorGUILayout.Toggle( step.boolVal); } EditorGUILayout.EndHorizontal(); } else if (step.intVal == 1) { EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Clip:", GUILayout.Width(50)); step.obj = EditorGUILayout.ObjectField(step.obj, typeof(AudioClip), false); } EditorGUILayout.EndHorizontal(); } else if (step.intVal == 2) { EditorGUILayout.BeginHorizontal(); { if (bgmNames != null) EditorGUILayout.LabelField("Song:", GUILayout.Width(50)); step.intVal2 = EditorGUILayout.IntPopup( step.intVal2, bgmNames, bgmIds); EditorGUILayout.LabelField("Loop", GUILayout.Width(50)); step.boolVal = EditorGUILayout.Toggle( step.boolVal); } EditorGUILayout.EndHorizontal(); } EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Volume:", GUILayout.Width(50)); step.floatVal = EditorGUILayout.FloatField(step.floatVal, GUILayout.Width(200)); } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.ChangeInto: step.intVal2 =EditorGUILayout.IntPopup(step.intVal2, changeIntoNames, changeIntoIds, GUILayout.Width(100)); if (step.intVal2 == 0) { EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Parts:", GUILayout.Width(50)); step.obj = EditorGUILayout.ObjectField( step.obj, typeof(Transform), false,GUILayout.Width(200)); EditorGUILayout.LabelField("Prop:", GUILayout.Width(50)); step.intVal = EditorGUILayout.IntField( step.intVal,GUILayout.Width(50)); } EditorGUILayout.EndHorizontal(); } else if (step.intVal2 == 3) { EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Parts:", GUILayout.Width(50)); step.obj = EditorGUILayout.ObjectField(step.obj, typeof(Transform), false); } EditorGUILayout.EndHorizontal(); } break; case CutsceneStep.Action.PlayMovie: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Movie:", GUILayout.Width(50)); step.strVal = EditorGUILayout.TextField(step.strVal); EditorGUILayout.LabelField("Cancel On Input:", GUILayout.Width(100)); step.boolVal = EditorGUILayout.Toggle( step.boolVal); } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.UniqueAction: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Name:", GUILayout.Width(50)); step.strVal = EditorGUILayout.TextField(step.strVal,GUILayout.Width(200)); EditorGUILayout.LabelField("Phase :", GUILayout.Width(50)); step.intVal = EditorGUILayout.IntField( step.intVal,GUILayout.Width(50)); } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.Mood: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Mood:", GUILayout.Width(50)); step.intVal = EditorGUILayout.IntPopup( step.intVal, moodNames, moodIds,GUILayout.Width(300)); } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.ScaleTo: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Speed:",GUILayout.Width(50)); step.floatVal = EditorGUILayout.FloatField(step.floatVal, GUILayout.Width(70)); EditorGUILayout.LabelField(" Scale:",GUILayout.Width(40)); step.pos = EditorGUILayout.Vector3Field("", step.pos); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.localScale; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.localScale = step.pos; } } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("EaseType:", GUILayout.Width(60)); step.easeType = (iTween.EaseType) EditorGUILayout.EnumPopup(step.easeType, GUILayout.Width(300)); } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.WaitTouch: step.floatVal = EditorGUILayout.FloatField("Prompt Delay:", step.floatVal, GUILayout.Width(200)); step.intVal = EditorGUILayout.IntField("Choice:", step.intVal, GUILayout.Width(200)); step.boolVal = EditorGUILayout.Toggle("Send GameLog Touch", step.boolVal,GUILayout.Width (200)); if( step.boolVal ) { step.intVal2 = EditorGUILayout.IntField("ID:", step.intVal2, GUILayout.Width(200)); } break; case CutsceneStep.Action.WaitSound: EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("For:", GUILayout.Width(50)); step.intVal = EditorGUILayout.IntPopup(step.intVal, new string[] { "(Any)", "Sound", "Blow", "Clap","BlowNoDelay","ClapNoDelay" }, new int[] { 0, 1, 2, 3, 4, 5 } , GUILayout.Width(300)); EditorGUILayout.LabelField("Timeout:", GUILayout.Width(50)); step.floatVal = EditorGUILayout.FloatField(step.floatVal, GUILayout.Width(70)); if( step.boolVal ) { step.intVal2 = EditorGUILayout.IntField("ID:", step.intVal2, GUILayout.Width(200)); } } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Send GameLog Voice", GUILayout.Width(150)); step.boolVal = EditorGUILayout.Toggle( step.boolVal); } EditorGUILayout.EndHorizontal(); break; case CutsceneStep.Action.GameLog: //GameStart, GameEnd, ChapterStart, ChapterEnd step.intVal = EditorGUILayout.IntPopup(step.intVal, gameLogNames, gameLogIds, GUILayout.Width(100)); if( step.intVal < 2 ) //GameStart, GameEnd { EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("ID:", GUILayout.Width(50)); step.intVal2 = EditorGUILayout.IntField( step.intVal2, GUILayout.Width(200)); } EditorGUILayout.EndHorizontal(); } break; } /* step.floatVal = EditorGUILayout.FloatField("Value:", step.floatVal); step.target = EditorGUILayout.ObjectField("Target:", step.target, typeof(UnityEngine.Object), true); */ EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("Comment: ", GUILayout.Width(60)); step.note = EditorGUILayout.TextField(step.note); }EditorGUILayout.EndHorizontal(); GUILayout.Space(1); } EditorGUILayout.EndVertical(); } }
public long GetStat(ActorData.StatType type) { if (data != null) return data.stats[(int)type].current; return 0; }
private void OnDeletedActor(string[] newContent, ActorData actor) { int deleted = counters.FindIndex(item => item.Id == actor.id); if (deleted >= 0) { counters.RemoveAt(deleted); } }
private void DrawNonZoomArea() { // GUI.Box(new Rect(0.0f, 0.0f, 600.0f, 50.0f), "Adjust zoom of middle box with slider or mouse wheel.\nMove zoom area dragging with middle mouse button or Alt+left mouse button."); _zoom = EditorGUI.Slider(new Rect(20.0f, 20.0f, 600.0f, 15.0f), _zoom, kZoomMin, kZoomMax); //GUI.Box(new Rect(0.0f, 300.0f - 25.0f, 600.0f, 25.0f), "Unzoomed Box"); GUI.Box(new Rect(0.0f, position.height - 150.0f, position.width, position.height), "Unzoomed Box"); GUILayout.BeginArea(new Rect(0.0f, position.height - 145.0f, position.width, 145.0f)); //CutsceneStep step1 = null; //StepOp stepOp = StepOp.NoOp; CutsceneStep step = currentStep; if( step != null ) { Color bgrndBak = GUI.backgroundColor; Color colorBak = GUI.color; GUI.backgroundColor = LcCutsceneEditor.selectedId == step.stepId ? Color.cyan : bgrndBak; #if UNITY_EDITOR if( step.bCurrentStep ) GUI.backgroundColor = Color.red; #endif EditorGUILayout.BeginVertical("Button"); EditorGUILayout.BeginHorizontal(); GUI.color = step.actor != null ? step.actor.symbolColor : colorBak; if (GUILayout.Button ("", GUILayout.Width(20))) { SelectStep(step.stepId); } GUI.color = colorBak; step.stepId = EditorGUILayout.IntField(step.stepId); step.preId = EditorGUILayout.IntField("Prev Id:", step.preId); step.delay = EditorGUILayout.FloatField("Delay:", step.delay); // if (GUILayout.Button("Up", GUILayout.Width(90))) { // SelectStep(step.stepId); // step1 = step; // stepOp = StepOp.Up; // } // if (GUILayout.Button("Down", GUILayout.Width(90))) { // SelectStep(step.stepId); // step1 = step; // stepOp = StepOp.Down; // } // if (GUILayout.Button("Delete", GUILayout.Width(90))) { // if( EditorUtility.DisplayDialog("This Step Delete?" // ,"Are you sure you want to delete? ", "Yes", "No") ) // { // step1 = step; // stepOp = StepOp.Del; // } // // } // if (GUILayout.Button("Add Step", GUILayout.Width(90))) { // step1 = step; // stepOp = StepOp.AddAfter; // } // if (GUILayout.Button("Run To", GUILayout.Width(90))) { // SelectStep(step.stepId); // RunTo (step.stepId); // } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); // step.objectIncludeActor = (GameObject) EditorGUILayout.ObjectField(step.objectIncludeActor // , typeof(GameObject), true, GUILayout.Width(150)); // // if (step.objectIncludeActor != null) // step.actor = step.objectIncludeActor.GetComponentInChildren<ActorBase>(); step.actor = (ActorBase) EditorGUILayout.ObjectField(step.actor, typeof(ActorBase), true , GUILayout.Width(150)); if( step.actor != null ) { if( step.actor.objIncludeActor != null ) { step.actor = step.actor.objIncludeActor; } } tempAcitonDisplay = CutsceneStep.ConverterActionIDToActionDisplayID(step.action); tempAcitonDisplay = (CutsceneStep.ActionDisplay) EditorGUILayout.EnumPopup(tempAcitonDisplay, GUILayout.Width(100)); step.action = CutsceneStep.ConverterActionDisplayIDToActionID(tempAcitonDisplay); ActorChar actorChar = null; if (step.actor != null) actorChar = step.actor.GetComponent<ActorChar>(); switch (step.action) { case CutsceneStep.Action.MoveTo: step.pos = EditorGUILayout.Vector3Field("Pos:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.position; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.position = step.pos; } step.floatVal = EditorGUILayout.FloatField("Speed:", step.floatVal, GUILayout.Width(210)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.target = (Transform) EditorGUILayout.ObjectField("MovePosTransform", step.target , typeof(Transform), true , GUILayout.Width(400)); if( step.target != null ) { step.pos = step.target.position; // step.pos.x = step.target.position.x; // step.pos.x = step.target.position.x; // step.pos.x = step.target.position.x; } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.boolVal = EditorGUILayout.Toggle("WithAction", step.boolVal,GUILayout.Width (200)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.obj = EditorGUILayout.ObjectField("Path:", step.obj, typeof(LcPath), true , GUILayout.Width(400)); step.easeType = (iTween.EaseType) EditorGUILayout.EnumPopup("EaseType:", step.easeType , GUILayout.Width(300)); break; case CutsceneStep.Action.JumpTo: step.pos = EditorGUILayout.Vector3Field("Pos:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.position; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.position = step.pos; } step.floatVal = EditorGUILayout.FloatField("Speed:", step.floatVal, GUILayout.Width(210)); break; case CutsceneStep.Action.GoBack: step.floatVal = EditorGUILayout.FloatField("Speed:", step.floatVal, GUILayout.Width(210)); step.easeType = (iTween.EaseType) EditorGUILayout.EnumPopup("EaseType:", step.easeType); break; case CutsceneStep.Action.WaitFor: step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } step.pos = EditorGUILayout.Vector3Field("Offset:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.position - step.target.position; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.position = step.target.position + step.pos; } break; case CutsceneStep.Action.Follow: step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } step.floatVal = EditorGUILayout.FloatField("Speed:", step.floatVal, GUILayout.Width(200)); // step.boolVal = EditorGUILayout.Toggle("Vertical:", step.boolVal, GUILayout.Width(180)); step.pos = EditorGUILayout.Vector3Field("Offset:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.position - step.target.position; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.position = step.target.position + step.pos; } break; case CutsceneStep.Action.Rotate: step.pos = EditorGUILayout.Vector3Field("Angle:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.eulerAngles; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.eulerAngles = step.pos; } break; case CutsceneStep.Action.Caption: if (dialogs != null) step.intVal = EditorGUILayout.IntPopup("Dialog:", step.intVal, dialogs, dialogIds); step.floatVal = EditorGUILayout.FloatField("Duration:", step.floatVal); break; case CutsceneStep.Action.TalkTo: case CutsceneStep.Action.SpeechTo: if (step.actor != null) { ReadActionData(step.actor); if (dialogs != null) step.intVal = EditorGUILayout.IntPopup("Dialog:", step.intVal, dialogs, dialogIds); step.floatVal = EditorGUILayout.FloatField("Duration:", step.floatVal); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.boolVal = EditorGUILayout.Toggle("NextLoopAction:", step.boolVal); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } if (actorChar != null && actorChar.actionNames != null) step.intVal2 = EditorGUILayout.IntPopup("Action:", step.intVal2, actorChar.actionNames, actorChar.actionIds); else step.intVal2 = EditorGUILayout.IntField("Action:", step.intVal2); } break; case CutsceneStep.Action.Action: if (step.actor != null) { if (actorChar != null) ReadActionData(step.actor); if (actorChar != null && actorChar.actionNames != null) step.intVal = EditorGUILayout.IntPopup("Action:", step.intVal, actorChar.actionNames, actorChar.actionIds); else step.intVal = EditorGUILayout.IntField("Action:", step.intVal); if (dialogs != null) step.intVal2 = EditorGUILayout.IntPopup("Dialog:", step.intVal2, dialogs, dialogIds); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.boolVal = EditorGUILayout.Toggle("NextLoopAction:", step.boolVal, GUILayout.Width(200)); step.boolVal2 = EditorGUILayout.Toggle("Ignore Blink:", step.boolVal2, GUILayout.Width(200)); } break; case CutsceneStep.Action.LoopAction: if (step.actor != null) { if (actorChar != null) ReadLoopActionData(step.actor); if (actorChar != null && actorChar.loopActionNames != null) step.intVal = EditorGUILayout.IntPopup("Loop Action:", step.intVal, actorChar.loopActionNames, actorChar.loopActionIds); else step.intVal = EditorGUILayout.IntField("Loop Action:", step.intVal); step.boolVal = EditorGUILayout.Toggle("Ignore Blink:", step.boolVal, GUILayout.Width(200)); } break; case CutsceneStep.Action.LoadScene: step.strVal = EditorGUILayout.TextField("Name:", step.strVal); step.intVal = EditorGUILayout.IntField("Effect:", step.intVal, GUILayout.Width(200)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.strVal2 = EditorGUILayout.TextField("Param:", step.strVal2); step.obj = EditorGUILayout.ObjectField("Return Cutscene:", step.obj, typeof(CutsceneMgr), true); break; case CutsceneStep.Action.Setup: if (GUILayout.Button("Save", GUILayout.Width(80))) { if (step.actor == null) { UnityEngine.Object[] objs = GameObject.FindObjectsOfType(typeof(ActorBase)); step.actorData = new ActorData[objs.Length]; for (int i = 0; i < objs.Length; i++) { ActorBase actor = (ActorBase) objs[i]; ActorData data = new ActorData(); data.actor = actor; data.pos = actor.transform.position; data.rota = actor.transform.rotation; data.scale = actor.transform.localScale; step.actorData[i] = data; } } else { step.actorData = new ActorData[1]; ActorBase actor = step.actor; ActorData data = new ActorData(); data.actor = actor; data.pos = actor.transform.position; data.rota = actor.transform.rotation; data.scale = actor.transform.localScale; step.actorData[0] = data; } } if (GUILayout.Button("Apply", GUILayout.Width(80))) { foreach (ActorData data in step.actorData) { if (data.actor != null) { data.actor.transform.position = data.pos; data.actor.transform.rotation = data.rota; data.actor.transform.localScale = data.scale; } } } break; case CutsceneStep.Action.LookAt: step.intVal = EditorGUILayout.IntPopup(step.intVal, lookAtNames, lookAtIds, GUILayout.Width(100)); switch (step.intVal) { case 0: step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true, GUILayout.Width(350)); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } break; case 1: step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true, GUILayout.Width(350)); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } step.pos = EditorGUILayout.Vector3Field("Pos:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { if (step.target != null) step.pos = step.target.position; } break; } /* step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true); step.pos = EditorGUILayout.Vector3Field("Pos:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Current", GUILayout.Width(80))) { step.pos = step.target.position; } step.boolVal = EditorGUILayout.Toggle("Position", step.boolVal);*/ break; case CutsceneStep.Action.Activate: step.intVal = EditorGUILayout.IntPopup(step.intVal, sendToNames, actionIds, GUILayout.Width(100)); step.target = (Transform) EditorGUILayout.ObjectField( "Target:", step.target, typeof(Transform), true); // if( step.target != null ) // { // ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); // if( temptarget != null ) // { // if( temptarget.objIncludeActor != null ) // { // step.target = temptarget.objIncludeActor.transform; // } // } // } switch (step.intVal) { case 0: case 2: step.boolVal = EditorGUILayout.Toggle("Wait", step.boolVal); break; } if (step.intVal == 2) { EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.strVal = EditorGUILayout.TextField("Method:", step.strVal); step.strVal2 = EditorGUILayout.TextField("Param:", step.strVal2); } break; case CutsceneStep.Action.Proc: step.strVal = EditorGUILayout.TextField("Name:", step.strVal); step.strVal2 = EditorGUILayout.TextField("Param:", step.strVal2); step.boolVal = EditorGUILayout.Toggle("Wait", step.boolVal); break; case CutsceneStep.Action.Sound: // step.intVal = EditorGUILayout.IntPopup(step.intVal, soundNames, actionIds, GUILayout.Width(80)); // step.obj = EditorGUILayout.ObjectField("Clip:", step.obj, typeof(AudioClip), false); // if (step.intVal == 0) // step.boolVal = EditorGUILayout.Toggle("Loop", step.boolVal); // // else if (step.intVal == 1) // { // step.obj = EditorGUILayout.ObjectField("Clip:", step.obj, typeof(AudioClip), false); // } // step.floatVal = EditorGUILayout.FloatField("Volume:", step.floatVal, GUILayout.Width(200)); step.intVal = EditorGUILayout.IntPopup(step.intVal, soundNames, actionIds, GUILayout.Width(80)); if (step.intVal == 0) { step.obj = EditorGUILayout.ObjectField("Clip:", step.obj, typeof(AudioClip), false); step.boolVal = EditorGUILayout.Toggle("Loop", step.boolVal); } else if (step.intVal == 1) { step.obj = EditorGUILayout.ObjectField("Clip:", step.obj, typeof(AudioClip), false); } else if (step.intVal == 2) { if (bgmNames != null) step.intVal2 = EditorGUILayout.IntPopup("Song:", step.intVal2, bgmNames, bgmIds); step.boolVal = EditorGUILayout.Toggle("Loop", step.boolVal); } step.floatVal = EditorGUILayout.FloatField("Volume:", step.floatVal, GUILayout.Width(200)); break; case CutsceneStep.Action.ChangeInto: step.intVal2 =EditorGUILayout.IntPopup(step.intVal2, changeIntoNames, changeIntoIds, GUILayout.Width(100)); if (step.intVal2 == 0) { step.obj = EditorGUILayout.ObjectField("Parts:", step.obj, typeof(Transform), false); step.intVal = EditorGUILayout.IntField("Prop:", step.intVal); } else if (step.intVal2 == 3) { step.obj = EditorGUILayout.ObjectField("Parts:", step.obj, typeof(Transform), false); } break; case CutsceneStep.Action.PlayMovie: step.strVal = EditorGUILayout.TextField("Movie:", step.strVal); step.boolVal = EditorGUILayout.Toggle("Cancel On Input:", step.boolVal); break; case CutsceneStep.Action.UniqueAction: step.strVal = EditorGUILayout.TextField("Name:", step.strVal); step.intVal = EditorGUILayout.IntField("Phase", step.intVal); break; case CutsceneStep.Action.Mood: step.intVal = EditorGUILayout.IntPopup("Mood:", step.intVal, moodNames, moodIds); break; case CutsceneStep.Action.ScaleTo: step.pos = EditorGUILayout.Vector3Field("Scale:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.localScale; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.localScale = step.pos; } step.floatVal = EditorGUILayout.FloatField("Speed:", step.floatVal, GUILayout.Width(210)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.easeType = (iTween.EaseType) EditorGUILayout.EnumPopup("EaseType:", step.easeType, GUILayout.Width(300)); break; case CutsceneStep.Action.WaitTouch: step.floatVal = EditorGUILayout.FloatField("Prompt Delay:", step.floatVal, GUILayout.Width(200)); step.intVal = EditorGUILayout.IntField("Choice:", step.intVal, GUILayout.Width(200)); EditorGUILayout.EndHorizontal(); step.boolVal = EditorGUILayout.Toggle("Send GameLog Touch", step.boolVal,GUILayout.Width (200)); if( step.boolVal ) { step.intVal2 = EditorGUILayout.IntField("ID:", step.intVal2, GUILayout.Width(200)); } EditorGUILayout.BeginHorizontal(); break; case CutsceneStep.Action.WaitSound: step.intVal = EditorGUILayout.IntPopup("For:", step.intVal, new string[] { "(Any)", "Sound", "Blow", "Clap","BlowNoDelay","ClapNoDelay" }, new int[] { 0, 1, 2, 3, 4, 5 } , GUILayout.Width(300)); step.floatVal = EditorGUILayout.FloatField("Timeout:", step.floatVal, GUILayout.Width(200)); EditorGUILayout.EndHorizontal(); step.boolVal = EditorGUILayout.Toggle("Send GameLog Voice", step.boolVal,GUILayout.Width (200)); if( step.boolVal ) { step.intVal2 = EditorGUILayout.IntField("ID:", step.intVal2, GUILayout.Width(200)); } EditorGUILayout.BeginHorizontal(); break; case CutsceneStep.Action.GameLog: //GameStart, GameEnd, ChapterStart, ChapterEnd step.intVal = EditorGUILayout.IntPopup(step.intVal, gameLogNames, gameLogIds, GUILayout.Width(100)); if( step.intVal < 2 ) //GameStart, GameEnd { step.intVal2 = EditorGUILayout.IntField("ID:", step.intVal2, GUILayout.Width(200)); } break; } /* step.floatVal = EditorGUILayout.FloatField("Value:", step.floatVal); step.target = EditorGUILayout.ObjectField("Target:", step.target, typeof(UnityEngine.Object), true); */ EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.note = EditorGUILayout.TextField("Comment:", step.note); EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); GUILayout.Space(1); } GUILayout.EndArea(); }
void OnGUI () { if (mgr == null) { EditorGUILayout.LabelField("Select Cutscene Object Or"); if (GUILayout.Button("Create New Cutscene")) { GameObject obj = new GameObject ("Cutscene"); obj.AddComponent ("CutsceneMgr"); if (Selection.activeTransform != null) obj.transform.parent = Selection.activeTransform; Selection.activeGameObject = obj; // CutsceneMgr mgr1 = obj.GetComponent<CutsceneMgr>(); /* mgr1.touchEffects = new Transform[4]; mgr1.touchEffects[0] = AssetDatabase.LoadAssetAtPath( "Assets/DoraEffect/EffectPrefab/Dora_Touch_Reaction_eff.prefab", typeof(Transform)) as Transform; mgr1.touchEffects[1] = AssetDatabase.LoadAssetAtPath( "Assets/DoraEffect/EffectPrefab/Dora_Touch_Reaction_eff_squre.prefab", typeof(Transform)) as Transform; mgr1.touchEffects[2] = AssetDatabase.LoadAssetAtPath( "Assets/DoraEffect/EffectPrefab/Dora_Touch_Reaction_eff_star.prefab", typeof(Transform)) as Transform; mgr1.touchEffects[3] = AssetDatabase.LoadAssetAtPath( "Assets/DoraEffect/EffectPrefab/Dora_Touch_Reaction_eff_tri.prefab", typeof(Transform)) as Transform;*/ // mgr1.prePlugin = AssetDatabase.LoadAssetAtPath("Assets/Resources/Plugin.prefab" // , typeof(Transform)) as Transform; } return; } EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("Release Mgr",GUILayout.Width(90))) { mgr = null; title = "Cutscene"; dialogs = null; bgmNames = null; return; } mgr.note = EditorGUILayout.TextField("Cutscene Description:", mgr.note); EditorGUILayout.EndHorizontal(); //scroll1 = EditorGUILayout.BeginScrollView(scroll1); HandleEvents(); if (mgr.steps == null || mgr.steps.Count == 0) { if (GUILayout.Button("New Step")) { AddStep(null); } } else { DrawNonZoomArea(); // Within the zoom area all coordinates are relative to the top left corner of the zoom area // with the width and height being scaled versions of the original/unzoomed area's width and height. _zoomArea = new Rect(0.0f, 35.0f, position.width , position.height - 35.0f); EditorZoomArea.Begin(_zoom, _zoomArea); //GUILayout.BeginArea(new Rect(0.0f - _zoomCoordsOrigin.x, 35.0f - _zoomCoordsOrigin.y, position.width , mgr.steps.Count*80.0f)); GUILayout.BeginArea(new Rect(0.0f , 35.0f - _zoomCoordsOrigin.y, 1000.0f , mgr.steps.Count*145.0f)); //GUILayout.BeginArea(new Rect(0.0f , 35.0f - _zoomCoordsOrigin.y, position.width , mgr.steps.Count*100.0f)); CutsceneStep step1 = null; StepOp stepOp = StepOp.NoOp; Color bgrndBak = GUI.backgroundColor; Color colorBak = GUI.color; foreach (CutsceneStep step in mgr.steps) { GUI.backgroundColor = selectedId == step.stepId ? Color.cyan : bgrndBak; #if UNITY_EDITOR if( step.bCurrentStep ) GUI.backgroundColor = Color.red; #endif EditorGUILayout.BeginVertical("Button"); EditorGUILayout.BeginHorizontal(); GUI.color = step.actor != null ? step.actor.symbolColor : colorBak; if (GUILayout.Button ("", GUILayout.Width(20))) { SelectStep(step.stepId); } GUI.color = colorBak; step.stepId = EditorGUILayout.IntField(step.stepId); step.preId = EditorGUILayout.IntField("Prev Id:", step.preId); step.delay = EditorGUILayout.FloatField("Delay:", step.delay); if (GUILayout.Button("Up", GUILayout.Width(90))) { SelectStep(step.stepId); step1 = step; stepOp = StepOp.Up; } if (GUILayout.Button("Down", GUILayout.Width(90))) { SelectStep(step.stepId); step1 = step; stepOp = StepOp.Down; } if (GUILayout.Button("Delete", GUILayout.Width(90))) { if( EditorUtility.DisplayDialog("This Step Delete?" ,"Are you sure you want to delete? ", "Yes", "No") ) { step1 = step; stepOp = StepOp.Del; } } if (GUILayout.Button("Add Step", GUILayout.Width(90))) { step1 = step; stepOp = StepOp.AddAfter; } if (GUILayout.Button("Run To", GUILayout.Width(90))) { SelectStep(step.stepId); RunTo (step.stepId); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); // step.objectIncludeActor = (GameObject) EditorGUILayout.ObjectField(step.objectIncludeActor // , typeof(GameObject), true, GUILayout.Width(150)); // // if (step.objectIncludeActor != null) // step.actor = step.objectIncludeActor.GetComponentInChildren<ActorBase>(); step.actor = (ActorBase) EditorGUILayout.ObjectField(step.actor, typeof(ActorBase), true , GUILayout.Width(150)); if( step.actor != null ) { if( step.actor.objIncludeActor != null ) { step.actor = step.actor.objIncludeActor; } } tempAcitonDisplay = CutsceneStep.ConverterActionIDToActionDisplayID(step.action); tempAcitonDisplay = (CutsceneStep.ActionDisplay) EditorGUILayout.EnumPopup(tempAcitonDisplay, GUILayout.Width(100)); step.action = CutsceneStep.ConverterActionDisplayIDToActionID(tempAcitonDisplay); ActorChar actorChar = null; if (step.actor != null) actorChar = step.actor.GetComponent<ActorChar>(); switch (step.action) { case CutsceneStep.Action.MoveTo: step.pos = EditorGUILayout.Vector3Field("Pos:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.position; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.position = step.pos; } step.floatVal = EditorGUILayout.FloatField("Speed:", step.floatVal, GUILayout.Width(210)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.target = (Transform) EditorGUILayout.ObjectField("MovePosTransform", step.target , typeof(Transform), true , GUILayout.Width(400)); if( step.target != null ) { step.pos = step.target.position; // step.pos.x = step.target.position.x; // step.pos.x = step.target.position.x; // step.pos.x = step.target.position.x; } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.boolVal = EditorGUILayout.Toggle("WithAction", step.boolVal,GUILayout.Width (200)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.obj = EditorGUILayout.ObjectField("Path:", step.obj, typeof(LcPath), true , GUILayout.Width(400)); step.easeType = (iTween.EaseType) EditorGUILayout.EnumPopup("EaseType:", step.easeType , GUILayout.Width(300)); break; case CutsceneStep.Action.JumpTo: step.pos = EditorGUILayout.Vector3Field("Pos:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.position; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.position = step.pos; } step.floatVal = EditorGUILayout.FloatField("Speed:", step.floatVal, GUILayout.Width(210)); break; case CutsceneStep.Action.GoBack: step.floatVal = EditorGUILayout.FloatField("Speed:", step.floatVal, GUILayout.Width(210)); step.easeType = (iTween.EaseType) EditorGUILayout.EnumPopup("EaseType:", step.easeType); break; case CutsceneStep.Action.WaitFor: step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } step.pos = EditorGUILayout.Vector3Field("Offset:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.position - step.target.position; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.position = step.target.position + step.pos; } break; case CutsceneStep.Action.Follow: step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } step.floatVal = EditorGUILayout.FloatField("Speed:", step.floatVal, GUILayout.Width(200)); // step.boolVal = EditorGUILayout.Toggle("Vertical:", step.boolVal, GUILayout.Width(180)); step.pos = EditorGUILayout.Vector3Field("Offset:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.position - step.target.position; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.position = step.target.position + step.pos; } break; case CutsceneStep.Action.Rotate: step.pos = EditorGUILayout.Vector3Field("Angle:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.eulerAngles; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.eulerAngles = step.pos; } break; case CutsceneStep.Action.Caption: if (dialogs != null) step.intVal = EditorGUILayout.IntPopup("Dialog:", step.intVal, dialogs, dialogIds); step.floatVal = EditorGUILayout.FloatField("Duration:", step.floatVal); break; case CutsceneStep.Action.TalkTo: case CutsceneStep.Action.SpeechTo: if (step.actor != null) { if (actorChar != null) ReadActionData(step.actor); // ReadActionData(step.actor); // actorChar = step.actor.GetComponent<ActorChar>(); if (dialogs != null) step.intVal = EditorGUILayout.IntPopup("Dialog:", step.intVal, dialogs, dialogIds); step.floatVal = EditorGUILayout.FloatField("Duration:", step.floatVal); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.boolVal = EditorGUILayout.Toggle("NextLoopAction:", step.boolVal,GUILayout.Width (200)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } if (actorChar != null && actorChar.actionNames != null) { if( selectedId == step.stepId ) { //Debug.Log ("actorChar"+actorChar); // foreach( string a in actorChar.actionNames ) // { // //Debug.Log ("actorChar.actionNames"+a); // } // Debug.Log ("actorChar.actionNames"+actorChar.actionNames); // Debug.Log ("actorChar.actionIds"+actorChar.actionIds); } // step.intVal2 = EditorGUILayout.IntPopup("Action:", step.intVal2, actorChar.actionNames, // actorChar.actionIds); // string[] temp = actorChar.actionNames; step.intVal2 = EditorGUILayout.IntPopup("Action:", step.intVal2, actorChar.actionNames, actorChar.actionIds); } else { step.intVal2 = EditorGUILayout.IntField("Action:", step.intVal2); } } break; case CutsceneStep.Action.Action: if (step.actor != null) { if (actorChar != null) ReadActionData(step.actor); if (actorChar != null && actorChar.actionNames != null) step.intVal = EditorGUILayout.IntPopup("Action:", step.intVal, actorChar.actionNames, actorChar.actionIds); else step.intVal = EditorGUILayout.IntField("Action:", step.intVal); if (dialogs != null) step.intVal2 = EditorGUILayout.IntPopup("Dialog:", step.intVal2, dialogs, dialogIds); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.boolVal = EditorGUILayout.Toggle("NextLoopAction:", step.boolVal, GUILayout.Width(200)); step.boolVal2 = EditorGUILayout.Toggle("Ignore Blink:", step.boolVal2, GUILayout.Width(200)); } break; case CutsceneStep.Action.LoopAction: if (step.actor != null) { if (actorChar != null) ReadLoopActionData(step.actor); if (actorChar != null && actorChar.loopActionNames != null) step.intVal = EditorGUILayout.IntPopup("Loop Action:", step.intVal, actorChar.loopActionNames, actorChar.loopActionIds); else step.intVal = EditorGUILayout.IntField("Loop Action:", step.intVal); step.boolVal = EditorGUILayout.Toggle("Ignore Blink:", step.boolVal, GUILayout.Width(200)); } // step.intVal = EditorGUILayout.IntField("No.:", step.intVal, GUILayout.Width(240)); // step.floatVal = EditorGUILayout.FloatField("Duration:", step.floatVal, GUILayout.Width(200)); break; case CutsceneStep.Action.LoadScene: step.strVal = EditorGUILayout.TextField("Name:", step.strVal); step.intVal = EditorGUILayout.IntField("Effect:", step.intVal, GUILayout.Width(200)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.strVal2 = EditorGUILayout.TextField("Param:", step.strVal2); step.obj = EditorGUILayout.ObjectField("Return Cutscene:", step.obj, typeof(CutsceneMgr), true); break; case CutsceneStep.Action.Setup: if (GUILayout.Button("Save", GUILayout.Width(80))) { if (step.actor == null) { UnityEngine.Object[] objs = GameObject.FindObjectsOfType(typeof(ActorBase)); step.actorData = new ActorData[objs.Length]; for (int i = 0; i < objs.Length; i++) { ActorBase actor = (ActorBase) objs[i]; ActorData data = new ActorData(); data.actor = actor; data.pos = actor.transform.position; data.rota = actor.transform.rotation; data.scale = actor.transform.localScale; step.actorData[i] = data; } } else { step.actorData = new ActorData[1]; ActorBase actor = step.actor; ActorData data = new ActorData(); data.actor = actor; data.pos = actor.transform.position; data.rota = actor.transform.rotation; data.scale = actor.transform.localScale; step.actorData[0] = data; } } if (GUILayout.Button("Apply", GUILayout.Width(80))) { foreach (ActorData data in step.actorData) { if (data.actor != null) { data.actor.transform.position = data.pos; data.actor.transform.rotation = data.rota; data.actor.transform.localScale = data.scale; } } } break; case CutsceneStep.Action.LookAt: step.intVal = EditorGUILayout.IntPopup(step.intVal, lookAtNames, lookAtIds, GUILayout.Width(100)); switch (step.intVal) { case 0: step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true, GUILayout.Width(350)); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } break; case 1: step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true, GUILayout.Width(350)); if( step.target != null ) { ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); if( temptarget != null ) { if( temptarget.objIncludeActor != null ) { step.target = temptarget.objIncludeActor.transform; } } } step.pos = EditorGUILayout.Vector3Field("Pos:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { if (step.target != null) step.pos = step.target.position; } break; } /* step.target = (Transform) EditorGUILayout.ObjectField("Target:", step.target, typeof(Transform), true); step.pos = EditorGUILayout.Vector3Field("Pos:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Current", GUILayout.Width(80))) { step.pos = step.target.position; } step.boolVal = EditorGUILayout.Toggle("Position", step.boolVal);*/ break; case CutsceneStep.Action.Activate: step.intVal = EditorGUILayout.IntPopup(step.intVal, sendToNames, actionIds, GUILayout.Width(100)); step.target = (Transform) EditorGUILayout.ObjectField( "Target:", step.target, typeof(Transform), true); // if( step.target != null ) // { // ActorBase temptarget = step.target.gameObject.GetComponent<ActorBase>(); // if( temptarget != null ) // { // if( temptarget.objIncludeActor != null ) // { // step.target = temptarget.objIncludeActor.transform; // } // } // } switch (step.intVal) { case 0: case 2: step.boolVal = EditorGUILayout.Toggle("Wait", step.boolVal); break; } if (step.intVal == 2) { EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.strVal = EditorGUILayout.TextField("Method:", step.strVal); step.strVal2 = EditorGUILayout.TextField("Param:", step.strVal2); } break; case CutsceneStep.Action.Proc: step.strVal = EditorGUILayout.TextField("Name:", step.strVal); step.strVal2 = EditorGUILayout.TextField("Param:", step.strVal2); step.boolVal = EditorGUILayout.Toggle("Wait", step.boolVal); break; case CutsceneStep.Action.Sound: step.intVal = EditorGUILayout.IntPopup(step.intVal, soundNames, actionIds, GUILayout.Width(80)); if (step.intVal == 0) { step.obj = EditorGUILayout.ObjectField("Clip:", step.obj, typeof(AudioClip), false); step.boolVal = EditorGUILayout.Toggle("Loop", step.boolVal); } else if (step.intVal == 1) { step.obj = EditorGUILayout.ObjectField("Clip:", step.obj, typeof(AudioClip), false); } else if (step.intVal == 2) { if (bgmNames != null) step.intVal2 = EditorGUILayout.IntPopup("Song:", step.intVal2, bgmNames, bgmIds); step.boolVal = EditorGUILayout.Toggle("Loop", step.boolVal); } step.floatVal = EditorGUILayout.FloatField("Volume:", step.floatVal, GUILayout.Width(200)); break; case CutsceneStep.Action.ChangeInto: step.intVal2 =EditorGUILayout.IntPopup(step.intVal2, changeIntoNames, changeIntoIds, GUILayout.Width(100)); if (step.intVal2 == 0) { step.obj = EditorGUILayout.ObjectField("Parts:", step.obj, typeof(Transform), false); step.intVal = EditorGUILayout.IntField("Prop:", step.intVal); } else if (step.intVal2 == 3) { step.obj = EditorGUILayout.ObjectField("Parts:", step.obj, typeof(Transform), false); } break; case CutsceneStep.Action.PlayMovie: step.strVal = EditorGUILayout.TextField("Movie:", step.strVal); step.boolVal = EditorGUILayout.Toggle("Cancel On Input:", step.boolVal); break; case CutsceneStep.Action.UniqueAction: step.strVal = EditorGUILayout.TextField("Name:", step.strVal); step.intVal = EditorGUILayout.IntField("Phase", step.intVal); break; case CutsceneStep.Action.Mood: step.intVal = EditorGUILayout.IntPopup("Mood:", step.intVal, moodNames, moodIds); break; case CutsceneStep.Action.ScaleTo: step.pos = EditorGUILayout.Vector3Field("Scale:", step.pos, GUILayout.Width(240)); if (GUILayout.Button("Save", GUILayout.Width(80))) { step.pos = step.actor.transform.localScale; } if (GUILayout.Button("Apply", GUILayout.Width(80))) { step.actor.transform.localScale = step.pos; } step.floatVal = EditorGUILayout.FloatField("Speed:", step.floatVal, GUILayout.Width(210)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.easeType = (iTween.EaseType) EditorGUILayout.EnumPopup("EaseType:", step.easeType, GUILayout.Width(300)); break; case CutsceneStep.Action.WaitTouch: step.floatVal = EditorGUILayout.FloatField("Prompt Delay:", step.floatVal, GUILayout.Width(200)); step.intVal = EditorGUILayout.IntField("Choice:", step.intVal, GUILayout.Width(200)); EditorGUILayout.EndHorizontal(); step.boolVal = EditorGUILayout.Toggle("Send GameLog Touch", step.boolVal,GUILayout.Width (200)); if( step.boolVal ) { step.intVal2 = EditorGUILayout.IntField("ID:", step.intVal2, GUILayout.Width(200)); } EditorGUILayout.BeginHorizontal(); break; case CutsceneStep.Action.WaitSound: step.intVal = EditorGUILayout.IntPopup("For:", step.intVal, new string[] { "(Any)", "Sound", "Blow", "Clap","BlowNoDelay","ClapNoDelay" }, new int[] { 0, 1, 2, 3, 4, 5 } , GUILayout.Width(300)); step.floatVal = EditorGUILayout.FloatField("Timeout:", step.floatVal, GUILayout.Width(200)); EditorGUILayout.EndHorizontal(); step.boolVal = EditorGUILayout.Toggle("Send GameLog Voice", step.boolVal,GUILayout.Width (200)); if( step.boolVal ) { step.intVal2 = EditorGUILayout.IntField("ID:", step.intVal2, GUILayout.Width(200)); } EditorGUILayout.BeginHorizontal(); break; case CutsceneStep.Action.GameLog: //GameStart, GameEnd, ChapterStart, ChapterEnd step.intVal = EditorGUILayout.IntPopup(step.intVal, gameLogNames, gameLogIds, GUILayout.Width(100)); if( step.intVal < 2 ) //GameStart, GameEnd { step.intVal2 = EditorGUILayout.IntField("ID:", step.intVal2, GUILayout.Width(200)); } break; } /* step.floatVal = EditorGUILayout.FloatField("Value:", step.floatVal); step.target = EditorGUILayout.ObjectField("Target:", step.target, typeof(UnityEngine.Object), true); */ EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); step.note = EditorGUILayout.TextField("Comment:", step.note); EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); GUILayout.Space(1); } switch (stepOp) { case StepOp.AddAfter: AddStep(step1); break; case StepOp.Del: RemoveStep (step1); break; case StepOp.Up: int idx = mgr.steps.IndexOf(step1); if (idx > 0) { mgr.steps.Remove(step1); mgr.steps.Insert(idx - 1, step1); } break; case StepOp.Down: idx = mgr.steps.IndexOf(step1); if (idx < mgr.steps.Count - 1) { mgr.steps.Remove(step1); mgr.steps.Insert(idx + 1, step1); } break; } GUILayout.EndArea(); EditorZoomArea.End(); } //EditorGUILayout.EndScrollView(); }
public ActorLogicData(long uid, ActorData heroData) { this.UID = uid; this.m_ActorData = heroData; }
private void InitActor() { ActorData heroData0 = new ActorData(1000, "白骨精", "白骨精描述", "Actor_1000", "Hbgj26",20); ActorData heroData1 = new ActorData(1001, "楚庄王", "楚庄王描述", "Actor_1001", "Hczw30",18); ActorData heroData2 = new ActorData(1002, "貂蝉", "貂蝉描述", "Actor_1002", "Hdc16", 16); ActorData heroData3 = new ActorData(1003, "妲己", "妲己描述", "Actor_1003", "Hdj42", 14); ActorData heroData4 = new ActorData(1004, "典韦", "典韦描述", "Actor_1004", "Hdw36", 12); ActorData heroData5 = new ActorData(1005, "郭嘉", "郭嘉描述", "Actor_1005", "Hgj13", 10); ActorData heroData6 = new ActorData(1006, "勾践", "勾践描述", "Actor_1006", "Hgj33", 1); ActorData heroData7 = new ActorData(1007, "甘宁", "甘宁描述", "Actor_1007", "Hgn18", 1); ActorData heroData8 = new ActorData(1008, "阖闾", "阖闾描述", "Actor_1008", "Hhl31", 1); ActorData heroData9 = new ActorData(1009, "荆轲", "荆轲描述", "Actor_1009", "Hjk24", 1); ActorData heroData10 = new ActorData(1010, "晋文公", "晋文公描述", "Actor_1010", "Hjwg34", 1); ActorData heroData11 = new ActorData(1011, "鲁班", "鲁班描述", "Actor_1011", "Hlb02", 1); ActorData heroData12 = new ActorData(1012, "吕布", "吕布描述", "Actor_1012", "Hlb08", 1); ActorData heroData13 = new ActorData(1013, "马超", "马超描述", "Actor_1013", "Hmc27", 1); ActorData heroData14 = new ActorData(1014, "孟获", "孟获描述", "Actor_1014", "Hmh39", 1); ActorData heroData15 = new ActorData(1015, "马良", "马良描述", "Actor_1015", "Hml07", 1); ActorData heroData16 = new ActorData(1016, "齐桓公", "齐桓公描述", "Actor_1016", "Hqhg32", 1); ActorData heroData17 = new ActorData(1017, "秦始皇", "秦始皇描述", "Actor_1017", "Hqsh19", 1); ActorData heroData18 = new ActorData(1018, "孙武", "孙武描述", "Actor_1018", "Hsw40", 1); ActorData heroData19 = new ActorData(1019, "杨戬", "杨戬描述", "Actor_1019", "Hyj37", 1); ActorData heroData20 = new ActorData(1020, "张辽", "张辽描述", "Actor_1020", "Hzl20", 1); ActorData heroData21 = new ActorData(1021, "周瑜", "周瑜描述", "Actor_1021", "Hzy11", 1); ActorData monsterData0 = new ActorData(2000, "大强盗", "大强盗描述", "Actor_2000", "G1qd", 19); ActorData monsterData1 = new ActorData(2001, "狼", "狼描述", "Actor_2001", "G2L", 17); ActorData monsterData2 = new ActorData(2002, "骷髅弓兵", "骷髅弓兵描述", "Actor_2002", "G3kl", 15); ActorData monsterData3 = new ActorData(2003, "骷髅枪兵", "骷髅枪兵描述", "Actor_2003", "G4kl", 13); ActorData monsterData4 = new ActorData(2004, "僵尸", "僵尸描述", "Actor_2004", "G6js", 11); ActorData monsterData5 = new ActorData(2005, "刀兵", "刀兵描述", "Actor_2005", "G7db", 9); ActorData monsterData6 = new ActorData(2006, "弓兵", "弓兵描述", "Actor_2006", "G8gj", 1); ActorData monsterData7 = new ActorData(2007, "戟兵", "戟兵描述", "Actor_2007", "G9cm", 1); ActorData monsterData8 = new ActorData(2008, "小强盗", "小强盗描述", "Actor_2008", "G10qd", 1); ActorData monsterData9 = new ActorData(2009, "山贼", "山贼描述", "Actor_2009", "G11sz", 1); ActorData monsterData10 = new ActorData(2010, "章鱼", "章鱼公描述", "Actor_2010", "G12zy", 1); ActorData monsterData11 = new ActorData(2011, "草泥马", "草泥马描述", "Actor_2011", "G13cnm", 1); ActorData monsterData12 = new ActorData(2012, "女兵", "女兵描述", "Actor_2012", "G15nb", 1); ActorData monsterData13 = new ActorData(2013, "雅买蝶", "雅买蝶描述", "Actor_2013", "G16ymd", 1); ActorData monsterData14 = new ActorData(2014, "小女王", "小女王描述", "Actor_2014", "G17nw", 1); ActorData monsterData15 = new ActorData(2015, "大女王", "大女王描述", "Actor_2015", "G18nw", 1); ActorData monsterData16 = new ActorData(2016, "策士", "策士描述", "Actor_2016", "G21cs", 1); ActorData monsterData17 = new ActorData(2017, "盾兵", "盾兵描述", "Actor_2017", "G23dw", 1); this.m_ActorConfigDic = new Dictionary<int, ActorData>(); this.m_ActorConfigDic.Add(1000, heroData0); this.m_ActorConfigDic.Add(1001, heroData1); this.m_ActorConfigDic.Add(1002, heroData2); this.m_ActorConfigDic.Add(1003, heroData3); this.m_ActorConfigDic.Add(1004, heroData4); this.m_ActorConfigDic.Add(1005, heroData5); this.m_ActorConfigDic.Add(1006, heroData6); this.m_ActorConfigDic.Add(1007, heroData7); this.m_ActorConfigDic.Add(1008, heroData8); this.m_ActorConfigDic.Add(1009, heroData9); this.m_ActorConfigDic.Add(1010, heroData10); this.m_ActorConfigDic.Add(1011, heroData11); this.m_ActorConfigDic.Add(1012, heroData12); this.m_ActorConfigDic.Add(1013, heroData13); this.m_ActorConfigDic.Add(1014, heroData14); this.m_ActorConfigDic.Add(1015, heroData15); this.m_ActorConfigDic.Add(1016, heroData16); this.m_ActorConfigDic.Add(1017, heroData17); this.m_ActorConfigDic.Add(1018, heroData18); this.m_ActorConfigDic.Add(1019, heroData19); this.m_ActorConfigDic.Add(1020, heroData20); this.m_ActorConfigDic.Add(1021, heroData21); this.m_ActorConfigDic.Add(2000, monsterData0); this.m_ActorConfigDic.Add(2001, monsterData1); this.m_ActorConfigDic.Add(2002, monsterData2); this.m_ActorConfigDic.Add(2003, monsterData3); this.m_ActorConfigDic.Add(2004, monsterData4); this.m_ActorConfigDic.Add(2005, monsterData5); this.m_ActorConfigDic.Add(2006, monsterData6); this.m_ActorConfigDic.Add(2007, monsterData7); this.m_ActorConfigDic.Add(2008, monsterData8); this.m_ActorConfigDic.Add(2009, monsterData9); this.m_ActorConfigDic.Add(2010, monsterData10); this.m_ActorConfigDic.Add(2011, monsterData11); this.m_ActorConfigDic.Add(2012, monsterData12); this.m_ActorConfigDic.Add(2013, monsterData13); this.m_ActorConfigDic.Add(2014, monsterData14); this.m_ActorConfigDic.Add(2015, monsterData15); this.m_ActorConfigDic.Add(2016, monsterData16); this.m_ActorConfigDic.Add(2017, monsterData17); ActorLogicData heroLogicData0 = new ActorLogicData(10000 , heroData0); ActorLogicData heroLogicData1 = new ActorLogicData(10001 , heroData1); ActorLogicData heroLogicData2 = new ActorLogicData(10002 , heroData2); ActorLogicData heroLogicData3 = new ActorLogicData(10003 , heroData3); ActorLogicData heroLogicData4 = new ActorLogicData(10004 , heroData4); ActorLogicData heroLogicData5 = new ActorLogicData(10005 , heroData5); ActorLogicData heroLogicData6 = new ActorLogicData(10006 , heroData6); ActorLogicData heroLogicData7 = new ActorLogicData(10007 , heroData7); ActorLogicData heroLogicData8 = new ActorLogicData(10008 , heroData8); ActorLogicData heroLogicData9 = new ActorLogicData(10009 , heroData9); ActorLogicData heroLogicData10 = new ActorLogicData(10010, heroData10); ActorLogicData heroLogicData11 = new ActorLogicData(10011, heroData11); ActorLogicData heroLogicData12 = new ActorLogicData(10012, heroData12); ActorLogicData heroLogicData13 = new ActorLogicData(10013, heroData13); ActorLogicData heroLogicData14 = new ActorLogicData(10014, heroData14); ActorLogicData heroLogicData15 = new ActorLogicData(10015, heroData15); ActorLogicData heroLogicData16 = new ActorLogicData(10016, heroData16); ActorLogicData heroLogicData17 = new ActorLogicData(10017, heroData17); ActorLogicData heroLogicData18 = new ActorLogicData(10018, heroData18); ActorLogicData heroLogicData19 = new ActorLogicData(10019, heroData19); ActorLogicData heroLogicData20 = new ActorLogicData(10020, heroData20); ActorLogicData heroLogicData21 = new ActorLogicData(10021, heroData21); this.m_ActorLogicDic = new Dictionary<long, ActorLogicData>(); this.m_ActorLogicDic.Add(10000, heroLogicData0 ); this.m_ActorLogicDic.Add(10001, heroLogicData1 ); this.m_ActorLogicDic.Add(10002, heroLogicData2 ); this.m_ActorLogicDic.Add(10003, heroLogicData3 ); this.m_ActorLogicDic.Add(10004, heroLogicData4 ); this.m_ActorLogicDic.Add(10005, heroLogicData5 ); this.m_ActorLogicDic.Add(10006, heroLogicData6 ); this.m_ActorLogicDic.Add(10007, heroLogicData7 ); this.m_ActorLogicDic.Add(10008, heroLogicData8 ); this.m_ActorLogicDic.Add(10009, heroLogicData9 ); this.m_ActorLogicDic.Add(10010, heroLogicData10 ); this.m_ActorLogicDic.Add(10011, heroLogicData11 ); this.m_ActorLogicDic.Add(10012, heroLogicData12 ); this.m_ActorLogicDic.Add(10013, heroLogicData13 ); this.m_ActorLogicDic.Add(10014, heroLogicData14 ); this.m_ActorLogicDic.Add(10015, heroLogicData15 ); this.m_ActorLogicDic.Add(10016, heroLogicData16 ); this.m_ActorLogicDic.Add(10017, heroLogicData17 ); this.m_ActorLogicDic.Add(10018, heroLogicData18 ); this.m_ActorLogicDic.Add(10019, heroLogicData19 ); this.m_ActorLogicDic.Add(10020, heroLogicData20 ); this.m_ActorLogicDic.Add(10021, heroLogicData21); }