private void LevelEditorDlg_Shown(object sender, EventArgs e) { this.Btn再読み込み .ForeColor = Color.Purple; // KeepComment:@^_ConfuserElsa // NoRename:@^_ConfuserElsa this.Btn保存 .ForeColor = Color.Purple; // KeepComment:@^_ConfuserElsa // NoRename:@^_ConfuserElsa this.Tile_L.Items.Clear(); this.Tile_R.Items.Clear(); this.Enemy.Items.Clear(); foreach (string tileName in TileCatalog.GetDisplayNames()) { this.Tile_L.Items.Add(tileName); this.Tile_R.Items.Add(tileName); } foreach (string enemyName in EnemyCatalog.GetDisplayNames()) { this.Enemy.Items.Add(enemyName); } this.Tile_L.SelectedIndex = 0; this.Tile_R.SelectedIndex = 0; this.Enemy.SelectedIndex = 0; this.SetMode(LevelEditor.Mode_e.TILE); this.TileEnemySw .Focus(); // KeepComment:@^_ConfuserElsa // NoRename:@^_ConfuserElsa }
public void SetEnemy(string enemyName) { int index = SCommon.IndexOf(EnemyCatalog.GetNames(), enemyName); if (index == -1) { index = 0; // 2bs } this.Enemy.SelectedIndex = index; }
private static bool FindStartPoint(out int x1, out int y1, Map map, int direction) { return(map.FindCell(out x1, out y1, cell => { string enemyName = cell.EnemyName; if (enemyName == GameConsts.ENEMY_NONE) { return false; } Enemy enemy = EnemyCatalog.Create(enemyName, -1, -1); return enemy is Enemy_スタート地点 && ((Enemy_スタート地点)enemy).Direction == direction; })); }
void Awake() { //playerBehavior = GameObject.FindGameObjectWithTag("player").GetComponent<PlayerBehavior>(); craftingSystem = GetComponent <CraftingSystem>(); buildingCatalog = GetComponent <BuildingsCatalog>(); itemCatalog = GetComponent <ItemCatalog>(); inventoryCatalog = GetComponent <InventoryCatalog>(); citizenCatalog = GetComponent <CitizenCatalog>(); townCatalog = GetComponent <TownCatalog>(); enemyCatalog = GetComponent <EnemyCatalog>(); abilityCatalog = GetComponent <AbilityCatalog>(); perkCatalog = GetComponent <PerkCatalog>(); skillCatalog = GetComponent <SkillCatalog>(); UI = GetComponent <UI>(); messageLogText = GameObject.FindGameObjectWithTag("MessageLogBarUI").GetComponentInChildren <MessageLogText>(); clock = GetComponent <Clock>(); world = GameObject.FindGameObjectWithTag("World").GetComponent <World>(); }
private void LevelEditorDlg_Shown(object sender, EventArgs e) { this.Tile.Items.Clear(); this.Enemy.Items.Clear(); foreach (string tileName in TileCatalog.GetDisplayNames()) { this.Tile.Items.Add(tileName); } foreach (string enemyName in EnemyCatalog.GetDisplayNames()) { this.Enemy.Items.Add(enemyName); } this.Tile.SelectedIndex = 0; this.Enemy.SelectedIndex = 0; this.TileEnemySw.Text = TEXT_MODE_TILE; }
private static List <GroupInfo> CreateEnemyGroups() { List <GroupInfo> groups = new List <GroupInfo>(); string[] groupNames = EnemyCatalog.GetGroupNames(); string[] memberNames = EnemyCatalog.GetMemberNames(); int count = groupNames.Length; for (int index = 0; index < count; index++) { string groupName = groupNames[index]; string memberName = memberNames[index]; GroupInfo group; { int p = SCommon.IndexOf(groups, v => v.Name == groupName); if (p != -1) { group = groups[p]; } else { group = new GroupInfo() { Name = groupName, }; groups.Add(group); } } group.Members.Add(new GroupInfo.MemberInfo() { Name = memberName, Index = index, }); } return(groups); }
private void ReloadEnemies() { this.Enemies.Clear(); for (int x = 0; x < this.Map.W; x++) { for (int y = 0; y < this.Map.H; y++) { string enemyName = this.Map.Table[x, y].EnemyName; if (enemyName != GameConsts.ENEMY_NONE) { this.Enemies.Add(EnemyCatalog.Create( this.Map.Table[x, y].EnemyName, x * GameConsts.TILE_W + GameConsts.TILE_W / 2.0, y * GameConsts.TILE_H + GameConsts.TILE_H / 2.0 )); } } } }
public void SetEnemy(string enemyName) { int index = SCommon.IndexOf(EnemyCatalog.GetNames(), name => name == enemyName); if (index == -1) { throw new DDError(); } for (int groupIndex = 0; groupIndex < LevelEditor.EnemyGroups.Count; groupIndex++) { for (int memberIndex = 0; memberIndex < LevelEditor.EnemyGroups[groupIndex].Members.Count; memberIndex++) { if (LevelEditor.EnemyGroups[groupIndex].Members[memberIndex].Index == index) { this.EnemyGroup.SelectedIndex = groupIndex; this.EnemyMember.SelectedIndex = memberIndex; return; } } } throw new DDError(); }
void Start() { if (GetComponent <Toolbelt>()) { toolbelt = GetComponent <Toolbelt>(); } if (GetComponent <Skills>()) { skills = GetComponent <Skills>(); } enemyCatalog = gameManager.getEnemyCatalog(); enemyName = enemyCatalog.getNameContains(transform.name); transform.name = enemyName; if (enemyCatalog.getEnemyByName(enemyName) != null) { description = enemyCatalog.getEnemyByName(enemyName).getDescription(); type = enemyCatalog.getEnemyByName(enemyName).getType(); level = enemyCatalog.getEnemyByName(enemyName).getLevel(); health = enemyCatalog.getEnemyByName(enemyName).getBaseHealth(); ranged = enemyCatalog.getEnemyByName(enemyName).getRanged(); magic = enemyCatalog.getEnemyByName(enemyName).getMagic(); melee = enemyCatalog.getEnemyByName(enemyName).getMelee(); armor = enemyCatalog.getEnemyByName(enemyName).getBaseArmor(); movementspeed = enemyCatalog.getEnemyByName(enemyName).getBaseMovementSpeed(); agent.speed = movementspeed; attackSpeed = enemyCatalog.getEnemyByName(enemyName).getAttackSpeed(); critChance = enemyCatalog.getEnemyByName(enemyName).getBaseCritChange(); attackRange = enemyCatalog.getEnemyByName(enemyName).getAttackRange(); frostResistance = enemyCatalog.getEnemyByName(enemyName).getFrostResistance(); fireRestistance = enemyCatalog.getEnemyByName(enemyName).getFireResistance(); aggressive = enemyCatalog.getEnemyByName(enemyName).getAggressive(); droptable = enemyCatalog.getEnemyByName(enemyName).getDroptable(); inventory = transform.GetComponent <Inventory>(); abilities = enemyCatalog.getEnemyByName(enemyName).getAbilities(); } }
public string GetEnemy() { return(EnemyCatalog.GetNames()[this.Enemy.SelectedIndex]); }
public string GetEnemy() { return(EnemyCatalog.GetNames()[LevelEditor.EnemyGroups[this.EnemyGroup.SelectedIndex].Members[this.EnemyMember.SelectedIndex].Index]); }