// Add the tank information to the visibleEntities list public void AddTankInfo(Tank tank) { if (visibleEntities == null) { visibleEntities = new List <ViewInfoEntity>(); } ViewInfoEntity vie = new ViewInfoEntity(); vie.entityType = ViewInfoEntityType.Tank; vie.position = tank.transform.position; vie.forward = tank.transform.forward; visibleEntities.Add(vie); }
// Add the obstacle information to the visibleEntities list public void AddObstacleInfo(MapObstacle obs) { if (visibleEntities == null) { visibleEntities = new List <ViewInfoEntity>(); } ViewInfoEntity vie = new ViewInfoEntity(); vie.entityType = (obs.isBreakable ? ViewInfoEntityType.DestructableObject : ViewInfoEntityType.NonDestructableObject); vie.position = obs.transform.position; vie.forward = obs.transform.forward; visibleEntities.Add(vie); }