public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); EnemyEntry ee = (EnemyEntry)other; // General enemyModelN = ee.enemyModelN; enemyModelS = ee.enemyModelS; maxhp = ee.maxhp; speed = ee.speed; // AI values waitStates = new List <StateController.WaitStates>(); for (int i = 0; i < ee.waitStates.Count; i++) { waitStates.Add(ee.waitStates[i]); } waitTimeLimits = new RangedFloat(ee.waitTimeLimits.minValue, ee.waitTimeLimits.maxValue); chaseTimeLimit = ee.chaseTimeLimit; fleeDistance = ee.fleeDistance; fleeTimeLimit = ee.fleeTimeLimit; // Attacking meleeRange = ee.meleeRange; attackRate = ee.attackRate; attacks = ee.attacks; meleeTimeStartup = ee.meleeTimeStartup; meleeTimeAnimation = ee.meleeTimeAnimation; // Reward exp = ee.exp; money = ee.money; //Add some kind of loot table }
protected void DeleteEntry() { GUI.FocusControl(null); ScrObjLibraryEntry entry = entryLibrary.GetEntryByIndex(selIndex); string path = "Assets/LibraryData/" + NameString + "/" + NameString + "_" + entry.uuid + ".asset"; entryLibrary.RemoveEntryByIndex(selIndex); Undo.RecordObject(entryLibrary, "Deleted entry"); EditorUtility.SetDirty(entryLibrary); bool res = AssetDatabase.MoveAssetToTrash(path); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); if (res) { Debug.Log("Removed entry: " + entry.uuid); selIndex = -1; } else { Debug.LogError("Failed to remove entry: " + path); } RefreshEntryList(); }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); CharEntry cd = (CharEntry)other; portraitSet = cd.portraitSet; startClass = cd.startClass; startClassLevels = cd.startClassLevels; hp = cd.hp; dmg = cd.dmg; mnd = cd.mnd; skl = cd.skl; spd = cd.spd; def = cd.def; gHp = cd.gHp; gDmg = cd.gDmg; gMnd = cd.gMnd; gSkl = cd.gSkl; gSpd = cd.gSpd; gDef = cd.gDef; supports = new List <SupportTuple>(); for (int i = 0; i < cd.supports.Count; i++) { supports.Add(cd.supports[i]); } faction = cd.faction; mustSurvive = cd.mustSurvive; deathQuote = cd.deathQuote; }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); BackgroundEntry ce = (BackgroundEntry)other; sprite = ce.sprite; }
/// <summary> /// Copies the values from another entry. /// </summary> /// <param name="other"></param> public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); ItemEntry item = (ItemEntry)other; icon = item.icon; description = item.description; itemCategory = item.itemCategory; weaponType = item.weaponType; attackType = item.attackType; keyType = item.keyType; cost = item.cost; maxCharge = item.maxCharge; researchNeeded = item.researchNeeded; skillReq = item.skillReq; power = item.power; hitRate = item.hitRate; critRate = item.critRate; range.min = item.range.min; range.max = item.range.max; advantageType = new List <MovementType>(); for (int i = 0; i < item.advantageType.Count; i++) { advantageType.Add(item.advantageType[i]); } boost = item.boost; }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); SfxEntry ce = (SfxEntry)other; clip = ce.clip; }
/// <summary> /// Copies the values from another entry. /// </summary> /// <param name="other"></param> public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); SpriteEntry sprite = (SpriteEntry)other; value = sprite.value; }
public override bool Act(DialogueScene scene, DialogueActionData data) { scene.effectStartDuration.value = data.values[0] * 0.001f; scene.effectEndDuration.value = 0; ScrObjLibraryEntry[] originalCharacters = new ScrObjLibraryEntry[Utility.DIALOGUE_PLAYERS_COUNT + Utility.DIALOGUE_PLAYERS_OUTSIDE_COUNT]; int[] originalPoses = new int[Utility.DIALOGUE_PLAYERS_COUNT + Utility.DIALOGUE_PLAYERS_OUTSIDE_COUNT]; for (int i = 0; i < scene.characters.Length; i++) { originalCharacters[i] = scene.characters[i].value; originalPoses[i] = scene.poses[i].value; } for (int i = 1; i < data.values.Count; i += 2) { scene.characters[data.values[i + 1]].value = originalCharacters[data.values[i]]; scene.poses[data.values[i + 1]].value = originalPoses[data.values[i]]; if (scene.characters[data.values[i]].value.IsEqual(originalCharacters[data.values[i]])) { scene.characters[data.values[i]].value = null; scene.poses[data.values[i]].value = -1; } scene.characterTransforms[data.values[i + 1]].SetMoveDirection(scene.characterTransforms[data.values[i]].transform.position, data.values[i]); } return(true); }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); CharacterSkill cs = (CharacterSkill)other; icon = cs.icon; description = cs.description; activationType = cs.activationType; chance = cs.chance; percent = cs.percent; value = cs.value; boost = new Boost(); boost.AddBoost(cs.boost); includeSelf = cs.includeSelf; range = cs.range; rangeMax = cs.rangeMax; enemyCanAttack = cs.enemyCanAttack; weaponReq = cs.weaponReq; terrainReq = new List <TerrainTile>(); for (int i = 0; i < cs.terrainReq.Count; i++) { terrainReq.Add(cs.terrainReq[i]); } }
protected void InstansiateEntry() { GUI.FocusControl(null); if (!IsValidUuid(uuid)) { return; } ScrObjLibraryEntry entry = CreateInstance; entry.name = uuid; entry.uuid = uuid; entry.repColor = repColor; entry.entryName = uuid; string path = "Assets/LibraryData/" + NameString + "/" + NameString + "_" + uuid + ".asset"; entryLibrary.InsertEntry(entry, 0); Undo.RecordObject(entryLibrary, "Added entry"); EditorUtility.SetDirty(entryLibrary); AssetDatabase.CreateAsset(entry, path); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); uuid = ""; selIndex = 0; SelectEntry(); RefreshEntryList(); }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); MissionEntry mission = (MissionEntry)other; mapLocation = mission.mapLocation; mapDescription = mission.mapDescription; maps = new List <MapEntry>(); for (int i = 0; i < mission.maps.Count; i++) { maps.Add(mission.maps[i]); } squads = new List <SquadGroup>(); for (int i = 0; i < mission.squads.Count; i++) { squads.Add(mission.squads[i]); } duration = mission.duration; unlockReq = mission.unlockReq; unlockDay = mission.unlockDay; squadSize = mission.squadSize; characterReq = mission.characterReq; clearedMission = mission.clearedMission; reward = mission.reward; }
/// <summary> /// Copies the values from another entry. /// </summary> /// <param name="other"></param> public virtual void CopyValues(ScrObjLibraryEntry other) { uuid = other.uuid; entryName = other.entryName; repColor = other.repColor; tag = other.tag; }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); MusicEntry me = (MusicEntry)other; clip = me.clip; identifier = me.identifier; }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); CharacterEntry ce = (CharacterEntry)other; defaultColor = ce.defaultColor; poses = ce.poses; }
public void InsertEntry(ScrObjLibraryEntry obj, int pos) { initialized = false; list.Insert(pos, obj); entries.Add(obj.entryName, obj); InsertRepresentation(obj, pos); }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); DialogueEntry de = (DialogueEntry)other; actions = de.actions; participantColors = de.participantColors; }
public override bool Act(DialogueScene scene, DialogueJsonItem data) { ScrObjLibraryEntry temp = scene.characters[data.position1].value; scene.characters[data.position1].value = scene.characters[data.position2].value; scene.characters[data.position2].value = temp; return(true); }
public void AddEntry(ScrObjLibraryEntry obj) { // GenerateDictionary(); // list.Add(obj); // entries.Add(obj.entryName, obj); // AddRepresentation(obj); Debug.LogError("USE ADD_ENTRY"); }
public void InsertEntry(ScrObjLibraryEntry obj, int pos) { if (!initialized) { GenerateDictionary(); } list.Insert(pos, obj); entries.Add(obj.entryName, obj); }
public void RemoveEntryByIndex(int index) { initialized = false; ScrObjLibraryEntry entry = GetEntryByIndex(index); list.RemoveAt(index); entries.Remove(entry.uuid); representations.RemoveAt(index); }
/// <summary> /// Copies the values from another entry. /// </summary> /// <param name="other"></param> public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); ItemEntry item = (ItemEntry)other; equipType = item.equipType; icon = item.icon; tintColor = item.tintColor; cost = item.cost; }
public void AddEntry(ScrObjLibraryEntry obj) { if (!initialized) { GenerateDictionary(); } list.Add(obj); entries.Add(obj.entryName, obj); }
/// <summary> /// Copies the values from another entry. /// </summary> /// <param name="other"></param> public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); ItemEntry item = (ItemEntry)other; item_type = item.item_type; icon = item.icon; tintColor = item.tintColor; moneyValue = item.moneyValue; }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); MusicSetEntry ms = (MusicSetEntry)other; playerTheme = ms.playerTheme; enemyTheme = ms.enemyTheme; battleTheme = ms.battleTheme; healTheme = ms.healTheme; }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); MusicList ml = (MusicList)other; musicClips = new List <MusicEntry>(); for (int i = 0; i < ml.musicClips.Count; i++) { musicClips.Add(ml.musicClips[i]); } }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); SfxList ml = (SfxList)other; sfxClips = new List <SfxEntry>(); for (int i = 0; i < ml.sfxClips.Count; i++) { sfxClips.Add(ml.sfxClips[i]); } }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); PortraitEntry ce = (PortraitEntry)other; small = ce.small; poses = new Sprite[ce.poses.Length]; for (int i = 0; i < ce.poses.Length; i++) { poses[i] = ce.poses[i]; } }
protected void SaveSelectedEntry() { ScrObjLibraryEntry entry = entryLibrary.GetEntryByIndex(selIndex); entry.CopyValues(entryValues); Undo.RecordObject(entry, "Updated entry"); EditorUtility.SetDirty(entry); if (oldRepColor != entryValues.repColor) { oldRepColor = entryValues.repColor; RefreshEntryList(); } }
public void RemoveEntryByIndex(int index) { if (!initialized) { GenerateDictionary(); } ScrObjLibraryEntry entry = GetEntryByIndex(index); list.RemoveAt(index); entries.Remove(entry.uuid); representations.RemoveAt(index); }
public override void CopyValues(ScrObjLibraryEntry other) { base.CopyValues(other); DialogueEntry de = (DialogueEntry)other; frames = de.frames; participantColors = de.participantColors; nextLocation = de.nextLocation; nextEntry = de.nextEntry; changePosition = de.changePosition; playerPosition = de.playerPosition; nextArea = de.nextArea; }