コード例 #1
0
ファイル: AI.cs プロジェクト: mengtest/UnityRPG
        public static List<BattleAction> getBattleActionList(EnemyCharacter character, BattleGame game)
        {
            List<BattleAction> retvalList = character.aiActor.getBattleActionList(game);

            if (retvalList.Count == 0)
            {
                retvalList.Add(getEndTurnAction(character));
            }

            return retvalList;
        }
コード例 #2
0
        public static List <BattleAction> getBattleActionList(EnemyCharacter character, BattleGame game)
        {
            List <BattleAction> retvalList = character.aiActor.getBattleActionList(game);

            if (retvalList.Count == 0)
            {
                retvalList.Add(getEndTurnAction(character));
            }

            return(retvalList);
        }
コード例 #3
0
ファイル: CharacterFactory.cs プロジェクト: mengtest/UnityRPG
        private static EnemyCharacter getEnemyFromGameCharacter(GameCharacter gameChar, EnemyType enemyType)
        {
            EnemyCharacter enemyChar = new EnemyCharacter(enemyType)
            {
                abilityList = gameChar.abilityList,
                ac = gameChar.ac,
                activeEffects = gameChar.activeEffects,
                Ammo = gameChar.Ammo,
                ap = gameChar.ap,
                attack = gameChar.attack,
                characterSpriteIndex = gameChar.characterSpriteIndex,
                characterSpritesheetName = gameChar.characterSpritesheetName,
                displayChar = gameChar.displayChar,
                enemyType = enemyType,
                equippedArmor = gameChar.equippedArmor,
                hp = gameChar.hp,
                inventory = gameChar.inventory,
                name = gameChar.name,
                passiveEffects = gameChar.passiveEffects,
                portraitSpriteIndex = gameChar.portraitSpriteIndex,
                portraitSpritesheetName = gameChar.portraitSpritesheetName,
                totalAP = gameChar.totalAP,
                totalHP = gameChar.totalHP,
                type = CharacterType.Enemy,
                weapon = gameChar.weapon,
                x = gameChar.x,
                y = gameChar.y,
                strength = gameChar.strength,
                agility = gameChar.agility,
                endurance = gameChar.endurance,
                spirit = gameChar.spirit
          
            };

            return enemyChar;
        }
コード例 #4
0
ファイル: AI.cs プロジェクト: mengtest/UnityRPG
 private static BattleAction getEndTurnAction(EnemyCharacter character)
 {
     return new BattleAction() { AP=0, actionType = BattleActionType.EndTurn, character = character, targetCharacter = null, targetTile = null };
     
 }