コード例 #1
0
ファイル: Battle.cs プロジェクト: Git-Good/Face-of-an-Empire
 void GetAttackerInfo(GameObject attacker)
 {
     attackerCurrAttpoint  = entityStats.GetCurrAttackPoint(attacker);
     attackerDmg           = entityStats.GetCurrAttackDmg(attacker);
     attackerRangeDmg      = entityStats.GetCurrRangedAttackDmg(attacker);
     attackerCurrHealth    = entityStats.GetCurrHealth(attacker);
     attackerRange         = entityStats.GetCurrRange(attacker);
     attackerArmor         = entityStats.GetCurrArmor(attacker);
     attackerArmorPiercing = entityStats.GetCurrArmorPiercing(attacker);
 }
コード例 #2
0
 public bool CheckAllPoints(int playerID)
 {
     foreach (GameObject entity in entityStorage.GetPlayerEntityList(playerID))
     {
         if (entityStats.GetCurrMovementPoint(entity) != 0 || entityStats.GetCurrAttackPoint(entity) != 0)
         {
             if (entityStats.GetIdle(entity) == false)
             {
                 return(false);
             }
         }
     }
     return(true);
 }
コード例 #3
0
    public void HighlightPossAttack(GameObject entity, int selIndex) //TODO make attack rings smaller
    {
        if (entity == null || entityStats.GetCurrAttackPoint(entity) <= 0)
        {
            return;
        }
        //note: don't instantiate new List<int> right away and set it as entity.GetComponent<Entity>().validMovementPositions
        //for some reason reference is not kept of the original list and thus is not set
        entity.GetComponent <Entity>().validAttackPositions = GetCellIndexesRange(selIndex, entityStats.GetCurrRange(entity));
        HashSet <int> positions = entity.GetComponent <Entity>().validAttackPositions;

        foreach (int position in positions)
        {
            hexGrid.cells[position].EnableHighlight(Color.red);
        }
    }
コード例 #4
0
 void GetAIInfo(GameObject eEntity)
 {
     aicurrattpoint  = entityStats.GetCurrAttackPoint(eEntity);
     aimovepoint     = entityStats.GetCurrMaxMovementPoint(eEntity);
     aicurrmovepoint = entityStats.GetCurrMovementPoint(eEntity);
 }