Exemple #1
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);
 }
Exemple #2
0
 //find movement points
 void GetMovementInfo(GameObject attacker)
 {
     attackerMovepoint     = entityStats.GetCurrMaxMovementPoint(attacker);
     attackerCurrMovepoint = entityStats.GetCurrMovementPoint(attacker);
 }
 void GetAIInfo(GameObject eEntity)
 {
     aicurrattpoint  = entityStats.GetCurrAttackPoint(eEntity);
     aimovepoint     = entityStats.GetCurrMaxMovementPoint(eEntity);
     aicurrmovepoint = entityStats.GetCurrMovementPoint(eEntity);
 }
    public void HighlightPossMovement(GameObject entity, int selIndex)
    {
        if (entity == null)
        {
            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>().validMovementPositions = GetCellIndexesBlockers(selIndex, entityStats.GetCurrMovementPoint(entity));
        HashSet <int> positions = entity.GetComponent <Entity>().validMovementPositions;

        foreach (int position in positions)
        {
            hexGrid.cells[position].EnableHighlight(Color.white);
        }
    }