예제 #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);
 }
예제 #2
0
 //find movement points
 void GetMovementInfo(GameObject attacker)
 {
     attackerMovepoint     = entityStats.GetCurrMaxMovementPoint(attacker);
     attackerCurrMovepoint = entityStats.GetCurrMovementPoint(attacker);
 }
예제 #3
0
 void GetAIInfo(GameObject eEntity)
 {
     aicurrattpoint  = entityStats.GetCurrAttackPoint(eEntity);
     aimovepoint     = entityStats.GetCurrMaxMovementPoint(eEntity);
     aicurrmovepoint = entityStats.GetCurrMovementPoint(eEntity);
 }
예제 #4
0
    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);
        }
    }